home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / MPWGCC (Sources).cpt / Sources / local-alloc.c < prev    next >
MacBinary  |  1990-09-04  |  37.9 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Sep 4 18:32:52 1990, modified Tue Sep 4 18:32:52 1990, creator 'MPS ', type ASCII, 38023 bytes "local-alloc.c" , at 0x9507 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 6c 6f 63 61 6c 2d | 61 6c 6c 6f 63 2e 63 00 |..local-|alloc.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 94 87 00 | 00 01 ac a3 09 dc 14 a3 |........|........|
|00000060| 09 dc 14 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 88 82 00 00 |........|........|
|00000080| 2f 2a 20 41 6c 6c 6f 63 | 61 74 65 20 72 65 67 69 |/* Alloc|ate regi|
|00000090| 73 74 65 72 73 20 77 69 | 74 68 69 6e 20 61 20 62 |sters wi|thin a b|
|000000a0| 61 73 69 63 20 62 6c 6f | 63 6b 2c 20 66 6f 72 20 |asic blo|ck, for |
|000000b0| 47 4e 55 20 63 6f 6d 70 | 69 6c 65 72 2e 0d 20 20 |GNU comp|iler.. |
|000000c0| 20 43 6f 70 79 72 69 67 | 68 74 20 28 43 29 20 31 | Copyrig|ht (C) 1|
|000000d0| 39 38 37 2c 20 31 39 38 | 38 20 46 72 65 65 20 53 |987, 198|8 Free S|
|000000e0| 6f 66 74 77 61 72 65 20 | 46 6f 75 6e 64 61 74 69 |oftware |Foundati|
|000000f0| 6f 6e 2c 20 49 6e 63 2e | 0d 0d 54 68 69 73 20 66 |on, Inc.|..This f|
|00000100| 69 6c 65 20 69 73 20 70 | 61 72 74 20 6f 66 20 47 |ile is p|art of G|
|00000110| 4e 55 20 43 43 2e 0d 0d | 47 4e 55 20 43 43 20 69 |NU CC...|GNU CC i|
|00000120| 73 20 66 72 65 65 20 73 | 6f 66 74 77 61 72 65 3b |s free s|oftware;|
|00000130| 20 79 6f 75 20 63 61 6e | 20 72 65 64 69 73 74 72 | you can| redistr|
|00000140| 69 62 75 74 65 20 69 74 | 20 61 6e 64 2f 6f 72 20 |ibute it| and/or |
|00000150| 6d 6f 64 69 66 79 0d 69 | 74 20 75 6e 64 65 72 20 |modify.i|t under |
|00000160| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 74 68 65 |the term|s of the|
|00000170| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00000180| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 61 73 20 70 |lic Lice|nse as p|
|00000190| 75 62 6c 69 73 68 65 64 | 20 62 79 0d 74 68 65 20 |ublished| by.the |
|000001a0| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|000001b0| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|000001c0| 20 76 65 72 73 69 6f 6e | 20 31 2c 20 6f 72 20 28 | version| 1, or (|
|000001d0| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 0d |at your |option).|
|000001e0| 61 6e 79 20 6c 61 74 65 | 72 20 76 65 72 73 69 6f |any late|r versio|
|000001f0| 6e 2e 0d 0d 47 4e 55 20 | 43 43 20 69 73 20 64 69 |n...GNU |CC is di|
|00000200| 73 74 72 69 62 75 74 65 | 64 20 69 6e 20 74 68 65 |stribute|d in the|
|00000210| 20 68 6f 70 65 20 74 68 | 61 74 20 69 74 20 77 69 | hope th|at it wi|
|00000220| 6c 6c 20 62 65 20 75 73 | 65 66 75 6c 2c 0d 62 75 |ll be us|eful,.bu|
|00000230| 74 20 57 49 54 48 4f 55 | 54 20 41 4e 59 20 57 41 |t WITHOU|T ANY WA|
|00000240| 52 52 41 4e 54 59 3b 20 | 77 69 74 68 6f 75 74 20 |RRANTY; |without |
|00000250| 65 76 65 6e 20 74 68 65 | 20 69 6d 70 6c 69 65 64 |even the| implied|
|00000260| 20 77 61 72 72 61 6e 74 | 79 20 6f 66 0d 4d 45 52 | warrant|y of.MER|
|00000270| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 6f 72 20 |CHANTABI|LITY or |
|00000280| 46 49 54 4e 45 53 53 20 | 46 4f 52 20 41 20 50 41 |FITNESS |FOR A PA|
|00000290| 52 54 49 43 55 4c 41 52 | 20 50 55 52 50 4f 53 45 |RTICULAR| PURPOSE|
|000002a0| 2e 20 20 53 65 65 20 74 | 68 65 0d 47 4e 55 20 47 |. See t|he.GNU G|
|000002b0| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|000002c0| 63 65 6e 73 65 20 66 6f | 72 20 6d 6f 72 65 20 64 |cense fo|r more d|
|000002d0| 65 74 61 69 6c 73 2e 0d | 0d 59 6f 75 20 73 68 6f |etails..|.You sho|
|000002e0| 75 6c 64 20 68 61 76 65 | 20 72 65 63 65 69 76 65 |uld have| receive|
|000002f0| 64 20 61 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |d a copy| of the |
|00000300| 47 4e 55 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |GNU Gene|ral Publ|
|00000310| 69 63 20 4c 69 63 65 6e | 73 65 0d 61 6c 6f 6e 67 |ic Licen|se.along|
|00000320| 20 77 69 74 68 20 47 4e | 55 20 43 43 3b 20 73 65 | with GN|U CC; se|
|00000330| 65 20 74 68 65 20 66 69 | 6c 65 20 43 4f 50 59 49 |e the fi|le COPYI|
|00000340| 4e 47 2e 20 20 49 66 20 | 6e 6f 74 2c 20 77 72 69 |NG. If |not, wri|
|00000350| 74 65 20 74 6f 0d 74 68 | 65 20 46 72 65 65 20 53 |te to.th|e Free S|
|00000360| 6f 66 74 77 61 72 65 20 | 46 6f 75 6e 64 61 74 69 |oftware |Foundati|
|00000370| 6f 6e 2c 20 36 37 35 20 | 4d 61 73 73 20 41 76 65 |on, 675 |Mass Ave|
|00000380| 2c 20 43 61 6d 62 72 69 | 64 67 65 2c 20 4d 41 20 |, Cambri|dge, MA |
|00000390| 30 32 31 33 39 2c 20 55 | 53 41 2e 20 20 2a 2f 0d |02139, U|SA. */.|
|000003a0| 0d 0d 2f 2a 20 41 6c 6c | 6f 63 61 74 69 6f 6e 20 |../* All|ocation |
|000003b0| 6f 66 20 68 61 72 64 20 | 72 65 67 69 73 74 65 72 |of hard |register|
|000003c0| 20 6e 75 6d 62 65 72 73 | 20 74 6f 20 70 73 65 75 | numbers| to pseu|
|000003d0| 64 6f 20 72 65 67 69 73 | 74 65 72 73 20 69 73 20 |do regis|ters is |
|000003e0| 64 6f 6e 65 20 69 6e 0d | 20 20 20 74 77 6f 20 70 |done in.| two p|
|000003f0| 61 73 73 65 73 2e 20 20 | 49 6e 20 74 68 69 73 20 |asses. |In this |
|00000400| 70 61 73 73 20 77 65 20 | 63 6f 6e 73 69 64 65 72 |pass we |consider|
|00000410| 20 6f 6e 6c 79 20 72 65 | 67 73 20 74 68 61 74 20 | only re|gs that |
|00000420| 61 72 65 20 62 6f 72 6e | 20 61 6e 64 0d 20 20 20 |are born| and. |
|00000430| 64 69 65 20 6f 6e 63 65 | 20 77 69 74 68 69 6e 20 |die once| within |
|00000440| 6f 6e 65 20 62 61 73 69 | 63 20 62 6c 6f 63 6b 2e |one basi|c block.|
|00000450| 20 20 57 65 20 64 6f 20 | 74 68 69 73 20 6f 6e 65 | We do |this one|
|00000460| 20 62 61 73 69 63 20 62 | 6c 6f 63 6b 20 61 74 20 | basic b|lock at |
|00000470| 61 0d 20 20 20 74 69 6d | 65 2e 20 20 54 68 65 6e |a. tim|e. Then|
|00000480| 20 74 68 65 20 6e 65 78 | 74 20 70 61 73 73 20 61 | the nex|t pass a|
|00000490| 6c 6c 6f 63 61 74 65 73 | 20 74 68 65 20 72 65 67 |llocates| the reg|
|000004a0| 69 73 74 65 72 73 20 74 | 68 61 74 20 72 65 6d 61 |isters t|hat rema|
|000004b0| 69 6e 2e 0d 20 20 20 54 | 77 6f 20 70 61 73 73 65 |in.. T|wo passe|
|000004c0| 73 20 61 72 65 20 75 73 | 65 64 20 62 65 63 61 75 |s are us|ed becau|
|000004d0| 73 65 20 74 68 69 73 20 | 70 61 73 73 20 75 73 65 |se this |pass use|
|000004e0| 73 20 6d 65 74 68 6f 64 | 73 20 74 68 61 74 20 77 |s method|s that w|
|000004f0| 6f 72 6b 20 6f 6e 6c 79 | 0d 20 20 20 6f 6e 20 6c |ork only|. on l|
|00000500| 69 6e 65 61 72 20 63 6f | 64 65 2c 20 62 75 74 20 |inear co|de, but |
|00000510| 74 68 61 74 20 64 6f 20 | 61 20 62 65 74 74 65 72 |that do |a better|
|00000520| 20 6a 6f 62 20 74 68 61 | 6e 20 74 68 65 20 67 65 | job tha|n the ge|
|00000530| 6e 65 72 61 6c 20 6d 65 | 74 68 6f 64 73 0d 20 20 |neral me|thods. |
|00000540| 20 75 73 65 64 20 69 6e | 20 67 6c 6f 62 61 6c 5f | used in| global_|
|00000550| 61 6c 6c 6f 63 2c 20 61 | 6e 64 20 6d 6f 72 65 20 |alloc, a|nd more |
|00000560| 71 75 69 63 6b 6c 79 20 | 74 6f 6f 2e 0d 0d 20 20 |quickly |too... |
|00000570| 20 54 68 65 20 61 73 73 | 69 67 6e 6d 65 6e 74 73 | The ass|ignments|
|00000580| 20 6d 61 64 65 20 61 72 | 65 20 72 65 63 6f 72 64 | made ar|e record|
|00000590| 65 64 20 69 6e 20 74 68 | 65 20 76 65 63 74 6f 72 |ed in th|e vector|
|000005a0| 20 72 65 67 5f 72 65 6e | 75 6d 62 65 72 0d 20 20 | reg_ren|umber. |
|000005b0| 20 77 68 6f 73 65 20 73 | 70 61 63 65 20 69 73 20 | whose s|pace is |
|000005c0| 61 6c 6c 6f 63 61 74 65 | 64 20 68 65 72 65 2e 20 |allocate|d here. |
|000005d0| 20 54 68 65 20 72 74 6c | 20 63 6f 64 65 20 69 74 | The rtl| code it|
|000005e0| 73 65 6c 66 20 69 73 20 | 6e 6f 74 20 61 6c 74 65 |self is |not alte|
|000005f0| 72 65 64 2e 0d 0d 20 20 | 20 57 65 20 61 73 73 69 |red... | We assi|
|00000600| 67 6e 20 65 61 63 68 20 | 69 6e 73 74 72 75 63 74 |gn each |instruct|
|00000610| 69 6f 6e 20 69 6e 20 74 | 68 65 20 62 61 73 69 63 |ion in t|he basic|
|00000620| 20 62 6c 6f 63 6b 20 61 | 20 6e 75 6d 62 65 72 0d | block a| number.|
|00000630| 20 20 20 77 68 69 63 68 | 20 69 73 20 69 74 73 20 | which| is its |
|00000640| 6f 72 64 65 72 20 66 72 | 6f 6d 20 74 68 65 20 62 |order fr|om the b|
|00000650| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 74 68 65 20 |eginning| of the |
|00000660| 62 6c 6f 63 6b 2e 0d 20 | 20 20 54 68 65 6e 20 77 |block.. | Then w|
|00000670| 65 20 63 61 6e 20 72 65 | 70 72 65 73 65 6e 74 20 |e can re|present |
|00000680| 74 68 65 20 6c 69 66 65 | 74 69 6d 65 20 6f 66 20 |the life|time of |
|00000690| 61 20 70 73 65 75 64 6f | 20 72 65 67 69 73 74 65 |a pseudo| registe|
|000006a0| 72 20 77 69 74 68 0d 20 | 20 20 61 20 70 61 69 72 |r with. | a pair|
|000006b0| 20 6f 66 20 6e 75 6d 62 | 65 72 73 2c 20 61 6e 64 | of numb|ers, and|
|000006c0| 20 63 68 65 63 6b 20 66 | 6f 72 20 63 6f 6e 66 6c | check f|or confl|
|000006d0| 69 63 74 73 20 65 61 73 | 69 6c 79 2e 0d 20 20 20 |icts eas|ily.. |
|000006e0| 57 65 20 63 61 6e 20 72 | 65 63 6f 72 64 20 74 68 |We can r|ecord th|
|000006f0| 65 20 61 76 61 69 6c 61 | 62 69 6c 69 74 79 20 6f |e availa|bility o|
|00000700| 66 20 68 61 72 64 20 72 | 65 67 69 73 74 65 72 73 |f hard r|egisters|
|00000710| 20 77 69 74 68 20 61 0d | 20 20 20 48 41 52 44 5f | with a.| HARD_|
|00000720| 52 45 47 5f 53 45 54 20 | 66 6f 72 20 65 61 63 68 |REG_SET |for each|
|00000730| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 2e 20 20 54 | instruc|tion. T|
|00000740| 68 65 20 48 41 52 44 5f | 52 45 47 5f 53 45 54 0d |he HARD_|REG_SET.|
|00000750| 20 20 20 63 6f 6e 74 61 | 69 6e 73 20 30 20 6f 72 | conta|ins 0 or|
|00000760| 20 31 20 66 6f 72 20 65 | 61 63 68 20 68 61 72 64 | 1 for e|ach hard|
|00000770| 20 72 65 67 2e 0d 0d 20 | 20 20 54 6f 20 61 76 6f | reg... | To avo|
|00000780| 69 64 20 72 65 67 69 73 | 74 65 72 20 73 68 75 66 |id regis|ter shuf|
|00000790| 66 6c 69 6e 67 2c 20 77 | 65 20 74 69 65 20 72 65 |fling, w|e tie re|
|000007a0| 67 69 73 74 65 72 73 20 | 74 6f 67 65 74 68 65 72 |gisters |together|
|000007b0| 20 77 68 65 6e 20 6f 6e | 65 0d 20 20 20 64 69 65 | when on|e. die|
|000007c0| 73 20 62 79 20 62 65 69 | 6e 67 20 63 6f 70 69 65 |s by bei|ng copie|
|000007d0| 64 20 69 6e 74 6f 20 61 | 6e 6f 74 68 65 72 2c 20 |d into a|nother, |
|000007e0| 6f 72 20 64 69 65 73 20 | 69 6e 20 61 6e 20 69 6e |or dies |in an in|
|000007f0| 73 74 72 75 63 74 69 6f | 6e 20 74 68 61 74 0d 20 |structio|n that. |
|00000800| 20 20 64 6f 65 73 20 61 | 72 69 74 68 6d 65 74 69 | does a|rithmeti|
|00000810| 63 20 74 6f 20 70 72 6f | 64 75 63 65 20 61 6e 6f |c to pro|duce ano|
|00000820| 74 68 65 72 2e 20 20 54 | 68 65 20 74 69 65 64 20 |ther. T|he tied |
|00000830| 72 65 67 69 73 74 65 72 | 73 20 61 72 65 0d 20 20 |register|s are. |
|00000840| 20 61 6c 6c 6f 63 61 74 | 65 64 20 61 73 20 6f 6e | allocat|ed as on|
|00000850| 65 2e 20 20 52 65 67 69 | 73 74 65 72 73 20 77 69 |e. Regi|sters wi|
|00000860| 74 68 20 64 69 66 66 65 | 72 65 6e 74 20 72 65 67 |th diffe|rent reg|
|00000870| 20 63 6c 61 73 73 20 70 | 72 65 66 65 72 65 6e 63 | class p|referenc|
|00000880| 65 73 0d 20 20 20 63 61 | 6e 20 6e 65 76 65 72 20 |es. ca|n never |
|00000890| 62 65 20 74 69 65 64 20 | 75 6e 6c 65 73 73 20 74 |be tied |unless t|
|000008a0| 68 65 20 63 6c 61 73 73 | 20 70 72 65 66 65 72 72 |he class| preferr|
|000008b0| 65 64 20 62 79 20 6f 6e | 65 20 69 73 20 61 20 73 |ed by on|e is a s|
|000008c0| 75 62 63 6c 61 73 73 0d | 20 20 20 6f 66 20 74 68 |ubclass.| of th|
|000008d0| 65 20 6f 6e 65 20 70 72 | 65 66 65 72 72 65 64 20 |e one pr|eferred |
|000008e0| 62 79 20 74 68 65 20 6f | 74 68 65 72 2e 0d 0d 20 |by the o|ther... |
|000008f0| 20 20 54 79 69 6e 67 20 | 69 73 20 72 65 70 72 65 | Tying |is repre|
|00000900| 73 65 6e 74 65 64 20 77 | 69 74 68 20 22 71 75 61 |sented w|ith "qua|
|00000910| 6e 74 69 74 79 20 6e 75 | 6d 62 65 72 73 22 2e 0d |ntity nu|mbers"..|
|00000920| 20 20 20 41 20 6e 6f 6e | 2d 74 69 65 64 20 72 65 | A non|-tied re|
|00000930| 67 69 73 74 65 72 20 69 | 73 20 67 69 76 65 6e 20 |gister i|s given |
|00000940| 61 20 6e 65 77 20 71 75 | 61 6e 74 69 74 79 20 6e |a new qu|antity n|
|00000950| 75 6d 62 65 72 2e 0d 20 | 20 20 54 69 65 64 20 72 |umber.. | Tied r|
|00000960| 65 67 69 73 74 65 72 73 | 20 68 61 76 65 20 74 68 |egisters| have th|
|00000970| 65 20 73 61 6d 65 20 71 | 75 61 6e 74 69 74 79 20 |e same q|uantity |
|00000980| 6e 75 6d 62 65 72 2e 0d | 20 20 20 0d 20 20 20 57 |number..| . W|
|00000990| 65 20 68 61 76 65 20 70 | 72 6f 76 69 73 69 6f 6e |e have p|rovision|
|000009a0| 20 74 6f 20 65 78 65 6d | 70 74 20 72 65 67 69 73 | to exem|pt regis|
|000009b0| 74 65 72 73 2c 20 65 76 | 65 6e 20 77 68 65 6e 20 |ters, ev|en when |
|000009c0| 74 68 65 79 20 61 72 65 | 20 63 6f 6e 74 61 69 6e |they are| contain|
|000009d0| 65 64 0d 20 20 20 77 69 | 74 68 69 6e 20 74 68 65 |ed. wi|thin the|
|000009e0| 20 62 6c 6f 63 6b 2c 20 | 74 68 61 74 20 63 61 6e | block, |that can|
|000009f0| 20 62 65 20 74 69 65 64 | 20 74 6f 20 6f 74 68 65 | be tied| to othe|
|00000a00| 72 73 20 74 68 61 74 20 | 61 72 65 20 6e 6f 74 20 |rs that |are not |
|00000a10| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 69 74 2e |containe|d in it.|
|00000a20| 0d 20 20 20 54 68 69 73 | 20 69 73 20 73 6f 20 74 |. This| is so t|
|00000a30| 68 61 74 20 67 6c 6f 62 | 61 6c 5f 61 6c 6c 6f 63 |hat glob|al_alloc|
|00000a40| 20 63 6f 75 6c 64 20 70 | 72 6f 63 65 73 73 20 74 | could p|rocess t|
|00000a50| 68 65 6d 20 62 6f 74 68 | 20 61 6e 64 20 74 69 65 |hem both| and tie|
|00000a60| 20 74 68 65 6d 20 74 68 | 65 6e 2e 0d 20 20 20 42 | them th|en.. B|
|00000a70| 75 74 20 74 68 69 73 20 | 69 73 20 63 75 72 72 65 |ut this |is curre|
|00000a80| 6e 74 6c 79 20 64 69 73 | 61 62 6c 65 64 20 73 69 |ntly dis|abled si|
|00000a90| 6e 63 65 20 74 79 69 6e | 67 20 69 6e 20 67 6c 6f |nce tyin|g in glo|
|00000aa0| 62 61 6c 5f 61 6c 6c 6f | 63 20 69 73 20 6e 6f 74 |bal_allo|c is not|
|00000ab0| 0d 20 20 20 79 65 74 20 | 69 6d 70 6c 65 6d 65 6e |. yet |implemen|
|00000ac0| 74 65 64 2e 20 20 2a 2f | 0d 0d 23 69 6e 63 6c 75 |ted. */|..#inclu|
|00000ad0| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0d 23 69 6e |de <stdi|o.h>.#in|
|00000ae0| 63 6c 75 64 65 20 22 63 | 6f 6e 66 69 67 2e 68 22 |clude "c|onfig.h"|
|00000af0| 0d 23 69 6e 63 6c 75 64 | 65 20 22 72 74 6c 2e 68 |.#includ|e "rtl.h|
|00000b00| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 66 6c 61 67 |".#inclu|de "flag|
|00000b10| 73 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 62 |s.h".#in|clude "b|
|00000b20| 61 73 69 63 2d 62 6c 6f | 63 6b 2e 68 22 0d 23 69 |asic-blo|ck.h".#i|
|00000b30| 6e 63 6c 75 64 65 20 22 | 72 65 67 73 2e 68 22 0d |nclude "|regs.h".|
|00000b40| 23 69 6e 63 6c 75 64 65 | 20 22 68 61 72 64 2d 72 |#include| "hard-r|
|00000b50| 65 67 2d 73 65 74 2e 68 | 22 0d 23 69 6e 63 6c 75 |eg-set.h|".#inclu|
|00000b60| 64 65 20 22 69 6e 73 6e | 2d 63 6f 6e 66 69 67 2e |de "insn|-config.|
|00000b70| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 72 65 63 |h".#incl|ude "rec|
|00000b80| 6f 67 2e 68 22 0d 0d 23 | 69 66 64 65 66 20 4d 50 |og.h"..#|ifdef MP|
|00000b90| 57 0d 23 69 6e 63 6c 75 | 64 65 20 3c 43 75 72 73 |W.#inclu|de <Curs|
|00000ba0| 6f 72 43 74 6c 2e 68 3e | 0d 23 65 6e 64 69 66 0d |orCtl.h>|.#endif.|
|00000bb0| 0d 2f 2a 20 57 68 61 74 | 20 61 62 6f 75 74 20 68 |./* What| about h|
|00000bc0| 61 72 64 77 61 72 65 20 | 72 65 67 69 73 74 65 72 |ardware |register|
|00000bd0| 73 20 75 73 65 64 20 61 | 6e 64 20 73 65 74 20 77 |s used a|nd set w|
|00000be0| 69 74 68 69 6e 20 73 61 | 6d 65 20 69 6e 73 6e 3f |ithin sa|me insn?|
|00000bf0| 0d 20 20 20 57 69 6c 6c | 20 74 68 61 74 20 65 76 |. Will| that ev|
|00000c00| 65 72 20 68 61 70 70 65 | 6e 20 66 6f 72 20 61 20 |er happe|n for a |
|00000c10| 6e 6f 6e 2d 66 69 78 65 | 64 20 72 65 67 69 73 74 |non-fixe|d regist|
|00000c20| 65 72 3f 0d 20 20 20 4f | 75 72 20 6c 69 66 65 74 |er?. O|ur lifet|
|00000c30| 69 6d 65 2d 74 72 61 63 | 6b 69 6e 67 20 66 6f 72 |ime-trac|king for|
|00000c40| 20 68 61 72 64 77 61 72 | 65 20 72 65 67 69 73 74 | hardwar|e regist|
|00000c50| 65 72 73 20 77 6f 75 6c | 64 20 6c 6f 73 65 2e 0d |ers woul|d lose..|
|00000c60| 20 20 20 5b 54 68 69 73 | 20 63 61 75 74 69 6f 6e | [This| caution|
|00000c70| 20 69 73 20 61 6e 20 6f | 6c 64 20 63 6f 6d 6d 65 | is an o|ld comme|
|00000c80| 6e 74 20 74 68 61 74 20 | 6d 61 79 20 62 65 20 6f |nt that |may be o|
|00000c90| 62 73 6f 6c 65 74 65 3b | 0d 20 20 20 20 49 20 74 |bsolete;|. I t|
|00000ca0| 68 69 6e 6b 20 74 68 65 | 72 65 20 69 73 20 6e 6f |hink the|re is no|
|00000cb0| 20 6c 6f 6e 67 65 72 20 | 61 20 70 72 6f 62 6c 65 | longer |a proble|
|00000cc0| 6d 2c 20 62 75 74 20 49 | 27 6d 20 6e 6f 74 20 73 |m, but I|'m not s|
|00000cd0| 75 72 65 2e 5d 20 20 2a | 2f 0d 0c 0d 2f 2a 20 4e |ure.] *|/.../* N|
|00000ce0| 65 78 74 20 71 75 61 6e | 74 69 74 79 20 6e 75 6d |ext quan|tity num|
|00000cf0| 62 65 72 20 61 76 61 69 | 6c 61 62 6c 65 20 66 6f |ber avai|lable fo|
|00000d00| 72 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 2e 20 20 2a |r alloca|tion. *|
|00000d10| 2f 0d 0d 73 74 61 74 69 | 63 20 69 6e 74 20 6e 65 |/..stati|c int ne|
|00000d20| 78 74 5f 71 74 79 3b 0d | 0d 2f 2a 20 49 6e 20 61 |xt_qty;.|./* In a|
|00000d30| 6c 6c 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ll the f|ollowing|
|00000d40| 20 76 65 63 74 6f 72 73 | 20 69 6e 64 65 78 65 64 | vectors| indexed|
|00000d50| 20 62 79 20 71 75 61 6e | 74 69 74 79 20 6e 75 6d | by quan|tity num|
|00000d60| 62 65 72 2c 0d 20 20 20 | 6f 6e 6c 79 20 65 6c 65 |ber,. |only ele|
|00000d70| 6d 65 6e 74 73 20 61 74 | 20 69 6e 64 69 63 65 73 |ments at| indices|
|00000d80| 20 3e 3d 20 46 49 52 53 | 54 5f 50 53 45 55 44 4f | >= FIRS|T_PSEUDO|
|00000d90| 5f 52 45 47 49 53 54 45 | 52 20 61 72 65 20 61 63 |_REGISTE|R are ac|
|00000da0| 74 75 61 6c 6c 79 20 75 | 73 65 64 2e 20 20 2a 2f |tually u|sed. */|
|00000db0| 0d 0d 2f 2a 20 45 6c 65 | 6d 65 6e 74 20 51 20 69 |../* Ele|ment Q i|
|00000dc0| 73 20 74 68 65 20 68 61 | 72 64 20 72 65 67 20 6e |s the ha|rd reg n|
|00000dd0| 75 6d 62 65 72 20 63 68 | 6f 73 65 6e 20 66 6f 72 |umber ch|osen for|
|00000de0| 20 71 75 61 6e 74 69 74 | 79 20 51 2c 0d 20 20 20 | quantit|y Q,. |
|00000df0| 6f 72 20 2d 31 20 69 66 | 20 6e 6f 6e 65 20 77 61 |or -1 if| none wa|
|00000e00| 73 20 66 6f 75 6e 64 2e | 20 20 2a 2f 0d 0d 73 74 |s found.| */..st|
|00000e10| 61 74 69 63 20 73 68 6f | 72 74 20 2a 71 74 79 5f |atic sho|rt *qty_|
|00000e20| 70 68 79 73 5f 72 65 67 | 3b 0d 0d 2f 2a 20 45 6c |phys_reg|;../* El|
|00000e30| 65 6d 65 6e 74 20 51 20 | 69 73 20 74 68 65 20 68 |ement Q |is the h|
|00000e40| 61 72 64 20 72 65 67 20 | 6e 75 6d 62 65 72 20 73 |ard reg |number s|
|00000e50| 75 67 67 65 73 74 65 64 | 20 66 6f 72 20 71 75 61 |uggested| for qua|
|00000e60| 6e 74 69 74 79 20 51 2c | 0d 20 20 20 6f 72 20 2d |ntity Q,|. or -|
|00000e70| 31 20 69 66 20 6e 6f 20 | 73 70 65 63 69 66 69 63 |1 if no |specific|
|00000e80| 20 73 75 67 67 65 73 74 | 69 6f 6e 2e 20 20 2a 2f | suggest|ion. */|
|00000e90| 0d 0d 73 74 61 74 69 63 | 20 73 68 6f 72 74 20 2a |..static| short *|
|00000ea0| 71 74 79 5f 70 68 79 73 | 5f 73 75 67 67 3b 0d 0d |qty_phys|_sugg;..|
|00000eb0| 2f 2a 20 45 6c 65 6d 65 | 6e 74 20 51 20 69 73 20 |/* Eleme|nt Q is |
|00000ec0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 72 65 |the numb|er of re|
|00000ed0| 66 73 20 74 6f 20 71 75 | 61 6e 74 69 74 79 20 51 |fs to qu|antity Q|
|00000ee0| 2e 20 20 2a 2f 0d 0d 73 | 74 61 74 69 63 20 73 68 |. */..s|tatic sh|
|00000ef0| 6f 72 74 20 2a 71 74 79 | 5f 6e 5f 72 65 66 73 3b |ort *qty|_n_refs;|
|00000f00| 0d 0d 2f 2a 20 45 6c 65 | 6d 65 6e 74 20 51 20 69 |../* Ele|ment Q i|
|00000f10| 73 20 61 20 72 65 67 20 | 63 6c 61 73 73 20 63 6f |s a reg |class co|
|00000f20| 6e 74 61 69 6e 65 64 20 | 69 6e 20 28 73 6d 61 6c |ntained |in (smal|
|00000f30| 6c 65 72 20 74 68 61 6e | 29 20 74 68 65 0d 20 20 |ler than|) the. |
|00000f40| 20 70 72 65 66 65 72 72 | 65 64 20 63 6c 61 73 73 | preferr|ed class|
|00000f50| 65 73 20 6f 66 20 61 6c | 6c 20 74 68 65 20 70 73 |es of al|l the ps|
|00000f60| 65 75 64 6f 20 72 65 67 | 73 20 74 68 61 74 20 61 |eudo reg|s that a|
|00000f70| 72 65 20 74 69 65 64 20 | 69 6e 20 71 75 61 6e 74 |re tied |in quant|
|00000f80| 69 74 79 20 51 2e 0d 20 | 20 20 54 68 69 73 20 69 |ity Q.. | This i|
|00000f90| 73 20 74 68 65 20 70 72 | 65 66 65 72 72 65 64 20 |s the pr|eferred |
|00000fa0| 63 6c 61 73 73 20 66 6f | 72 20 61 6c 6c 6f 63 61 |class fo|r alloca|
|00000fb0| 74 69 6e 67 20 74 68 61 | 74 20 71 75 61 6e 74 69 |ting tha|t quanti|
|00000fc0| 74 79 2e 20 20 2a 2f 0d | 0d 73 74 61 74 69 63 20 |ty. */.|.static |
|00000fd0| 65 6e 75 6d 20 72 65 67 | 5f 63 6c 61 73 73 20 2a |enum reg|_class *|
|00000fe0| 71 74 79 5f 6d 69 6e 5f | 63 6c 61 73 73 3b 0d 0d |qty_min_|class;..|
|00000ff0| 2f 2a 20 49 6e 73 6e 20 | 6e 75 6d 62 65 72 20 28 |/* Insn |number (|
|00001000| 63 6f 75 6e 74 69 6e 67 | 20 66 72 6f 6d 20 68 65 |counting| from he|
|00001010| 61 64 20 6f 66 20 62 61 | 73 69 63 20 62 6c 6f 63 |ad of ba|sic bloc|
|00001020| 6b 29 0d 20 20 20 77 68 | 65 72 65 20 71 75 61 6e |k). wh|ere quan|
|00001030| 74 69 74 79 20 51 20 77 | 61 73 20 62 6f 72 6e 2e |tity Q w|as born.|
|00001040| 20 20 2d 31 20 69 66 20 | 62 69 72 74 68 20 68 61 | -1 if |birth ha|
|00001050| 73 20 6e 6f 74 20 62 65 | 65 6e 20 72 65 63 6f 72 |s not be|en recor|
|00001060| 64 65 64 2e 20 20 2a 2f | 0d 0d 73 74 61 74 69 63 |ded. */|..static|
|00001070| 20 69 6e 74 20 2a 71 74 | 79 5f 62 69 72 74 68 3b | int *qt|y_birth;|
|00001080| 0d 0d 2f 2a 20 49 6e 73 | 6e 20 6e 75 6d 62 65 72 |../* Ins|n number|
|00001090| 20 28 63 6f 75 6e 74 69 | 6e 67 20 66 72 6f 6d 20 | (counti|ng from |
|000010a0| 68 65 61 64 20 6f 66 20 | 62 61 73 69 63 20 62 6c |head of |basic bl|
|000010b0| 6f 63 6b 29 0d 20 20 20 | 77 68 65 72 65 20 71 75 |ock). |where qu|
|000010c0| 61 6e 74 69 74 79 20 51 | 20 64 69 65 64 2e 20 20 |antity Q| died. |
|000010d0| 44 75 65 20 74 6f 20 74 | 68 65 20 77 61 79 20 74 |Due to t|he way t|
|000010e0| 79 69 6e 67 20 69 73 20 | 64 6f 6e 65 2c 0d 20 20 |ying is |done,. |
|000010f0| 20 61 6e 64 20 74 68 65 | 20 66 61 63 74 20 74 68 | and the| fact th|
|00001100| 61 74 20 77 65 20 63 6f | 6e 73 69 64 65 72 20 69 |at we co|nsider i|
|00001110| 6e 20 74 68 69 73 20 70 | 61 73 73 20 6f 6e 6c 79 |n this p|ass only|
|00001120| 20 72 65 67 73 20 74 68 | 61 74 20 64 69 65 20 62 | regs th|at die b|
|00001130| 75 74 20 6f 6e 63 65 2c | 0d 20 20 20 61 20 71 75 |ut once,|. a qu|
|00001140| 61 6e 74 69 74 79 20 63 | 61 6e 20 64 69 65 20 6f |antity c|an die o|
|00001150| 6e 6c 79 20 6f 6e 63 65 | 2e 20 20 45 61 63 68 20 |nly once|. Each |
|00001160| 71 75 61 6e 74 69 74 79 | 27 73 20 6c 69 66 65 20 |quantity|'s life |
|00001170| 73 70 61 6e 0d 20 20 20 | 69 73 20 61 20 73 65 74 |span. |is a set|
|00001180| 20 6f 66 20 63 6f 6e 73 | 65 63 75 74 69 76 65 20 | of cons|ecutive |
|00001190| 69 6e 73 6e 73 2e 20 20 | 2d 31 20 69 66 20 64 65 |insns. |-1 if de|
|000011a0| 61 74 68 20 68 61 73 20 | 6e 6f 74 20 62 65 65 6e |ath has |not been|
|000011b0| 20 72 65 63 6f 72 64 65 | 64 2e 20 20 2a 2f 0d 0d | recorde|d. */..|
|000011c0| 73 74 61 74 69 63 20 69 | 6e 74 20 2a 71 74 79 5f |static i|nt *qty_|
|000011d0| 64 65 61 74 68 3b 0d 0d | 2f 2a 20 4e 75 6d 62 65 |death;..|/* Numbe|
|000011e0| 72 20 6f 66 20 77 6f 72 | 64 73 20 6e 65 65 64 65 |r of wor|ds neede|
|000011f0| 64 20 74 6f 20 68 6f 6c | 64 20 74 68 65 20 64 61 |d to hol|d the da|
|00001200| 74 61 20 69 6e 20 71 75 | 61 6e 74 69 74 79 20 51 |ta in qu|antity Q|
|00001210| 2e 0d 20 20 20 54 68 69 | 73 20 64 65 70 65 6e 64 |.. Thi|s depend|
|00001220| 73 20 6f 6e 20 69 74 73 | 20 6d 61 63 68 69 6e 65 |s on its| machine|
|00001230| 20 6d 6f 64 65 2e 20 20 | 49 74 20 69 73 20 75 73 | mode. |It is us|
|00001240| 65 64 20 66 6f 72 20 74 | 68 65 73 65 20 70 75 72 |ed for t|hese pur|
|00001250| 70 6f 73 65 73 3a 0d 20 | 20 20 31 2e 20 49 66 20 |poses:. | 1. If |
|00001260| 69 74 20 69 73 20 30 2c | 20 74 68 65 20 71 74 79 |it is 0,| the qty|
|00001270| 20 69 73 20 6e 6f 74 20 | 72 65 61 6c 6c 79 20 69 | is not |really i|
|00001280| 6e 20 75 73 65 20 61 6e | 64 20 69 73 20 6e 6f 74 |n use an|d is not|
|00001290| 20 61 6c 6c 6f 63 61 74 | 65 64 2e 0d 20 20 20 32 | allocat|ed.. 2|
|000012a0| 2e 20 49 74 20 69 73 20 | 75 73 65 64 20 69 6e 20 |. It is |used in |
|000012b0| 63 6f 6d 70 75 74 69 6e | 67 20 74 68 65 20 72 65 |computin|g the re|
|000012c0| 6c 61 74 69 76 65 20 69 | 6d 70 6f 72 74 61 6e 63 |lative i|mportanc|
|000012d0| 65 73 20 6f 66 20 71 74 | 79 73 2c 0d 20 20 20 20 |es of qt|ys,. |
|000012e0| 20 20 77 68 69 63 68 20 | 64 65 74 65 72 6d 69 6e | which |determin|
|000012f0| 65 73 20 74 68 65 20 6f | 72 64 65 72 20 69 6e 20 |es the o|rder in |
|00001300| 77 68 69 63 68 20 77 65 | 20 6c 6f 6f 6b 20 66 6f |which we| look fo|
|00001310| 72 20 72 65 67 73 20 66 | 6f 72 20 74 68 65 6d 2e |r regs f|or them.|
|00001320| 0d 20 20 20 33 2e 20 49 | 74 20 69 73 20 75 73 65 |. 3. I|t is use|
|00001330| 64 20 69 6e 20 72 75 6c | 65 73 20 74 68 61 74 20 |d in rul|es that |
|00001340| 70 72 65 76 65 6e 74 20 | 74 79 69 6e 67 20 73 65 |prevent |tying se|
|00001350| 76 65 72 61 6c 20 72 65 | 67 69 73 74 65 72 73 20 |veral re|gisters |
|00001360| 6f 66 0d 20 20 20 20 20 | 20 64 69 66 66 65 72 65 |of. | differe|
|00001370| 6e 74 20 73 69 7a 65 73 | 20 69 6e 20 61 20 77 61 |nt sizes| in a wa|
|00001380| 79 20 74 68 61 74 20 69 | 73 20 67 65 6f 6d 65 74 |y that i|s geomet|
|00001390| 72 69 63 61 6c 6c 79 20 | 69 6d 70 6f 73 73 69 62 |rically |impossib|
|000013a0| 6c 65 0d 20 20 20 20 20 | 20 28 73 65 65 20 63 6f |le. | (see co|
|000013b0| 6d 62 69 6e 65 5f 72 65 | 67 73 29 2e 20 20 2a 2f |mbine_re|gs). */|
|000013c0| 0d 0d 73 74 61 74 69 63 | 20 69 6e 74 20 2a 71 74 |..static| int *qt|
|000013d0| 79 5f 73 69 7a 65 3b 0d | 0d 2f 2a 20 54 68 69 73 |y_size;.|./* This|
|000013e0| 20 68 6f 6c 64 73 20 74 | 68 65 20 6d 6f 64 65 20 | holds t|he mode |
|000013f0| 6f 66 20 74 68 65 20 72 | 65 67 69 73 74 65 72 73 |of the r|egisters|
|00001400| 20 74 68 61 74 20 61 72 | 65 20 74 69 65 64 20 74 | that ar|e tied t|
|00001410| 6f 20 71 74 79 20 51 2c | 0d 20 20 20 6f 72 20 56 |o qty Q,|. or V|
|00001420| 4f 49 44 6d 6f 64 65 20 | 69 66 20 72 65 67 69 73 |OIDmode |if regis|
|00001430| 74 65 72 73 20 77 69 74 | 68 20 64 69 66 66 65 72 |ters wit|h differ|
|00001440| 69 6e 67 20 6d 6f 64 65 | 73 20 61 72 65 20 74 69 |ing mode|s are ti|
|00001450| 65 64 20 74 6f 67 65 74 | 68 65 72 2e 20 20 2a 2f |ed toget|her. */|
|00001460| 0d 0d 73 74 61 74 69 63 | 20 65 6e 75 6d 20 6d 61 |..static| enum ma|
|00001470| 63 68 69 6e 65 5f 6d 6f | 64 65 20 2a 71 74 79 5f |chine_mo|de *qty_|
|00001480| 6d 6f 64 65 3b 0d 0d 2f | 2a 20 4e 75 6d 62 65 72 |mode;../|* Number|
|00001490| 20 6f 66 20 74 69 6d 65 | 73 20 61 20 72 65 67 20 | of time|s a reg |
|000014a0| 74 69 65 64 20 74 6f 20 | 71 74 79 20 51 20 6c 69 |tied to |qty Q li|
|000014b0| 76 65 73 20 61 63 72 6f | 73 73 20 61 20 43 41 4c |ves acro|ss a CAL|
|000014c0| 4c 5f 49 4e 53 4e 2e 20 | 20 2a 2f 0d 0d 73 74 61 |L_INSN. | */..sta|
|000014d0| 74 69 63 20 69 6e 74 20 | 2a 71 74 79 5f 6e 5f 63 |tic int |*qty_n_c|
|000014e0| 61 6c 6c 73 5f 63 72 6f | 73 73 65 64 3b 0d 0d 2f |alls_cro|ssed;../|
|000014f0| 2a 20 4e 6f 6e 7a 65 72 | 6f 20 6d 65 61 6e 73 20 |* Nonzer|o means |
|00001500| 64 6f 6e 27 74 20 61 6c | 6c 6f 63 61 74 65 20 71 |don't al|locate q|
|00001510| 74 79 20 51 20 69 66 20 | 77 65 20 63 61 6e 27 74 |ty Q if |we can't|
|00001520| 20 67 65 74 20 69 74 73 | 20 70 72 65 66 65 72 72 | get its| preferr|
|00001530| 65 64 20 63 6c 61 73 73 | 2e 20 20 2a 2f 0d 0d 73 |ed class|. */..s|
|00001540| 74 61 74 69 63 20 63 68 | 61 72 20 2a 71 74 79 5f |tatic ch|ar *qty_|
|00001550| 70 72 65 66 65 72 72 65 | 64 5f 6f 72 5f 6e 6f 74 |preferre|d_or_not|
|00001560| 68 69 6e 67 3b 0d 0d 2f | 2a 20 72 65 67 5f 71 74 |hing;../|* reg_qt|
|00001570| 79 5b 4e 5d 20 28 77 68 | 65 72 65 20 4e 20 69 73 |y[N] (wh|ere N is|
|00001580| 20 61 20 70 73 65 75 64 | 6f 20 72 65 67 20 6e 75 | a pseud|o reg nu|
|00001590| 6d 62 65 72 29 0d 20 20 | 20 69 73 20 74 68 65 20 |mber). | is the |
|000015a0| 71 74 79 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 68 |qty numb|er of th|
|000015b0| 61 74 20 72 65 67 20 28 | 77 68 69 63 68 20 69 73 |at reg (|which is|
|000015c0| 20 3e 3d 20 46 49 52 53 | 54 5f 50 53 45 55 44 4f | >= FIRS|T_PSEUDO|
|000015d0| 5f 52 45 47 49 53 54 45 | 52 29 2c 0d 20 20 20 6f |_REGISTE|R),. o|
|000015e0| 72 20 2d 31 20 69 66 20 | 28 52 45 47 20 4e 29 20 |r -1 if |(REG N) |
|000015f0| 69 73 20 6e 6f 74 20 6c | 6f 63 61 6c 20 74 6f 20 |is not l|ocal to |
|00001600| 74 68 65 20 63 75 72 72 | 65 6e 74 20 62 61 73 69 |the curr|ent basi|
|00001610| 63 20 62 6c 6f 63 6b 2c | 0d 20 20 20 6f 72 20 2d |c block,|. or -|
|00001620| 32 20 69 66 20 6e 6f 74 | 20 6b 6e 6f 77 6e 20 79 |2 if not| known y|
|00001630| 65 74 2e 0d 0d 20 20 20 | 49 66 20 4e 20 69 73 20 |et... |If N is |
|00001640| 3c 20 46 49 52 53 54 5f | 50 53 45 55 44 4f 5f 52 |< FIRST_|PSEUDO_R|
|00001650| 45 47 49 53 54 45 52 2c | 20 72 65 67 5f 71 74 79 |EGISTER,| reg_qty|
|00001660| 5b 4e 5d 20 69 73 20 2d | 31 2e 20 20 2a 2f 0d 0d |[N] is -|1. */..|
|00001670| 73 74 61 74 69 63 20 69 | 6e 74 20 2a 72 65 67 5f |static i|nt *reg_|
|00001680| 71 74 79 3b 0d 0d 2f 2a | 20 54 68 65 20 6f 66 66 |qty;../*| The off|
|00001690| 73 65 74 20 28 69 6e 20 | 77 6f 72 64 73 29 20 6f |set (in |words) o|
|000016a0| 66 20 72 65 67 69 73 74 | 65 72 20 4e 20 77 69 74 |f regist|er N wit|
|000016b0| 68 69 6e 20 69 74 73 20 | 71 75 61 6e 74 69 74 79 |hin its |quantity|
|000016c0| 2e 0d 20 20 20 54 68 69 | 73 20 63 61 6e 20 62 65 |.. Thi|s can be|
|000016d0| 20 6e 6f 6e 7a 65 72 6f | 20 69 66 20 72 65 67 69 | nonzero| if regi|
|000016e0| 73 74 65 72 20 4e 20 69 | 73 20 53 49 6d 6f 64 65 |ster N i|s SImode|
|000016f0| 2c 20 61 6e 64 20 68 61 | 73 20 62 65 65 6e 20 74 |, and ha|s been t|
|00001700| 69 65 64 0d 20 20 20 74 | 6f 20 61 20 73 75 62 72 |ied. t|o a subr|
|00001710| 65 67 20 6f 66 20 61 20 | 44 49 6d 6f 64 65 20 72 |eg of a |DImode r|
|00001720| 65 67 69 73 74 65 72 2e | 20 20 2a 2f 0d 0d 73 74 |egister.| */..st|
|00001730| 61 74 69 63 20 69 6e 74 | 20 2a 72 65 67 5f 6f 66 |atic int| *reg_of|
|00001740| 66 73 65 74 3b 0d 0d 2f | 2a 20 56 65 63 74 6f 72 |fset;../|* Vector|
|00001750| 20 6f 66 20 73 75 62 73 | 74 69 74 75 74 69 6f 6e | of subs|titution|
|00001760| 73 20 6f 66 20 72 65 67 | 69 73 74 65 72 20 6e 75 |s of reg|ister nu|
|00001770| 6d 62 65 72 73 2c 0d 20 | 20 20 75 73 65 64 20 74 |mbers,. | used t|
|00001780| 6f 20 6d 61 70 20 70 73 | 65 75 64 6f 20 72 65 67 |o map ps|eudo reg|
|00001790| 73 20 69 6e 74 6f 20 68 | 61 72 64 77 61 72 65 20 |s into h|ardware |
|000017a0| 72 65 67 73 2e 0d 20 20 | 20 54 68 69 73 20 69 73 |regs.. | This is|
|000017b0| 20 73 65 74 20 75 70 20 | 61 73 20 61 20 72 65 73 | set up |as a res|
|000017c0| 75 6c 74 20 6f 66 20 72 | 65 67 69 73 74 65 72 20 |ult of r|egister |
|000017d0| 61 6c 6c 6f 63 61 74 69 | 6f 6e 2e 0d 20 20 20 45 |allocati|on.. E|
|000017e0| 6c 65 6d 65 6e 74 20 4e | 20 69 73 20 74 68 65 20 |lement N| is the |
|000017f0| 68 61 72 64 20 72 65 67 | 20 61 73 73 69 67 6e 65 |hard reg| assigne|
|00001800| 64 20 74 6f 20 70 73 65 | 75 64 6f 20 72 65 67 20 |d to pse|udo reg |
|00001810| 4e 2c 0d 20 20 20 6f 72 | 20 69 73 20 2d 31 20 69 |N,. or| is -1 i|
|00001820| 66 20 6e 6f 20 68 61 72 | 64 20 72 65 67 20 77 61 |f no har|d reg wa|
|00001830| 73 20 61 73 73 69 67 6e | 65 64 2e 0d 20 20 20 49 |s assign|ed.. I|
|00001840| 66 20 4e 20 69 73 20 61 | 20 68 61 72 64 20 72 65 |f N is a| hard re|
|00001850| 67 20 6e 75 6d 62 65 72 | 2c 20 65 6c 65 6d 65 6e |g number|, elemen|
|00001860| 74 20 4e 20 69 73 20 4e | 2e 20 20 2a 2f 0d 0d 73 |t N is N|. */..s|
|00001870| 68 6f 72 74 20 2a 72 65 | 67 5f 72 65 6e 75 6d 62 |hort *re|g_renumb|
|00001880| 65 72 3b 0d 0d 2f 2a 20 | 53 65 74 20 6f 66 20 68 |er;../* |Set of h|
|00001890| 61 72 64 20 72 65 67 69 | 73 74 65 72 73 20 6c 69 |ard regi|sters li|
|000018a0| 76 65 20 61 74 20 74 68 | 65 20 63 75 72 72 65 6e |ve at th|e curren|
|000018b0| 74 20 70 6f 69 6e 74 20 | 69 6e 20 74 68 65 20 73 |t point |in the s|
|000018c0| 63 61 6e 0d 20 20 20 6f | 66 20 74 68 65 20 69 6e |can. o|f the in|
|000018d0| 73 74 72 75 63 74 69 6f | 6e 73 20 69 6e 20 61 20 |structio|ns in a |
|000018e0| 62 61 73 69 63 20 62 6c | 6f 63 6b 2e 20 20 2a 2f |basic bl|ock. */|
|000018f0| 0d 0d 73 74 61 74 69 63 | 20 48 41 52 44 5f 52 45 |..static| HARD_RE|
|00001900| 47 5f 53 45 54 20 72 65 | 67 73 5f 6c 69 76 65 3b |G_SET re|gs_live;|
|00001910| 0d 0d 2f 2a 20 49 6e 64 | 65 78 65 64 20 62 79 20 |../* Ind|exed by |
|00001920| 69 6e 73 6e 2d 6e 75 6d | 62 65 72 2d 77 69 74 68 |insn-num|ber-with|
|00001930| 69 6e 2d 62 61 73 69 63 | 2d 62 6c 6f 63 6b 2c 0d |in-basic|-block,.|
|00001940| 20 20 20 61 20 73 65 74 | 20 6f 72 20 68 61 72 64 | a set| or hard|
|00001950| 20 72 65 67 69 73 74 65 | 72 73 20 6c 69 76 65 20 | registe|rs live |
|00001960| 2a 61 66 74 65 72 2a 20 | 74 68 61 74 20 69 6e 73 |*after* |that ins|
|00001970| 6e 2e 20 20 2a 2f 0d 0d | 73 74 61 74 69 63 20 48 |n. */..|static H|
|00001980| 41 52 44 5f 52 45 47 5f | 53 45 54 20 2a 72 65 67 |ARD_REG_|SET *reg|
|00001990| 73 5f 6c 69 76 65 5f 61 | 74 3b 0d 0d 2f 2a 20 4e |s_live_a|t;../* N|
|000019a0| 6f 6e 7a 65 72 6f 20 69 | 66 20 61 20 43 41 4c 4c |onzero i|f a CALL|
|000019b0| 5f 49 4e 53 4e 20 68 61 | 73 20 62 65 65 6e 20 73 |_INSN ha|s been s|
|000019c0| 63 61 6e 6e 65 64 0d 20 | 20 20 62 75 74 20 77 65 |canned. | but we|
|000019d0| 20 68 61 76 65 20 6e 6f | 74 20 79 65 74 20 73 65 | have no|t yet se|
|000019e0| 65 6e 20 61 20 72 65 66 | 65 72 65 6e 63 65 20 74 |en a ref|erence t|
|000019f0| 6f 20 74 68 65 20 76 61 | 6c 75 65 20 72 65 74 75 |o the va|lue retu|
|00001a00| 72 6e 65 64 2e 20 20 2a | 2f 0d 0d 73 74 61 74 69 |rned. *|/..stati|
|00001a10| 63 20 69 6e 74 20 63 61 | 6c 6c 5f 73 65 65 6e 3b |c int ca|ll_seen;|
|00001a20| 0d 0d 2f 2a 20 43 6f 6d | 6d 75 6e 69 63 61 74 65 |../* Com|municate|
|00001a30| 20 6c 6f 63 61 6c 20 76 | 61 72 73 20 60 69 6e 73 | local v|ars `ins|
|00001a40| 6e 5f 6e 75 6d 62 65 72 | 27 20 61 6e 64 20 60 69 |n_number|' and `i|
|00001a50| 6e 73 6e 27 0d 20 20 20 | 66 72 6f 6d 20 60 62 6c |nsn'. |from `bl|
|00001a60| 6f 63 6b 5f 61 6c 6c 6f | 63 27 20 74 6f 20 60 72 |ock_allo|c' to `r|
|00001a70| 65 67 5f 69 73 5f 73 65 | 74 27 20 61 6e 64 20 60 |eg_is_se|t' and `|
|00001a80| 77 69 70 65 5f 64 65 61 | 64 5f 72 65 67 27 2e 20 |wipe_dea|d_reg'. |
|00001a90| 20 2a 2f 0d 73 74 61 74 | 69 63 20 69 6e 74 20 74 | */.stat|ic int t|
|00001aa0| 68 69 73 5f 69 6e 73 6e | 5f 6e 75 6d 62 65 72 3b |his_insn|_number;|
|00001ab0| 0d 73 74 61 74 69 63 20 | 72 74 78 20 74 68 69 73 |.static |rtx this|
|00001ac0| 5f 69 6e 73 6e 3b 0d 0d | 73 74 61 74 69 63 20 76 |_insn;..|static v|
|00001ad0| 6f 69 64 20 62 6c 6f 63 | 6b 5f 61 6c 6c 6f 63 20 |oid bloc|k_alloc |
|00001ae0| 28 29 3b 0d 73 74 61 74 | 69 63 20 69 6e 74 20 63 |();.stat|ic int c|
|00001af0| 6f 6d 62 69 6e 65 5f 72 | 65 67 73 20 28 29 3b 0d |ombine_r|egs ();.|
|00001b00| 73 74 61 74 69 63 20 76 | 6f 69 64 20 77 69 70 65 |static v|oid wipe|
|00001b10| 5f 64 65 61 64 5f 72 65 | 67 20 28 29 3b 0d 73 74 |_dead_re|g ();.st|
|00001b20| 61 74 69 63 20 69 6e 74 | 20 66 69 6e 64 5f 66 72 |atic int| find_fr|
|00001b30| 65 65 5f 72 65 67 20 28 | 29 3b 0d 73 74 61 74 69 |ee_reg (|);.stati|
|00001b40| 63 20 76 6f 69 64 20 72 | 65 67 5f 69 73 5f 62 6f |c void r|eg_is_bo|
|00001b50| 72 6e 20 28 29 3b 0d 73 | 74 61 74 69 63 20 76 6f |rn ();.s|tatic vo|
|00001b60| 69 64 20 72 65 67 5f 69 | 73 5f 73 65 74 20 28 29 |id reg_i|s_set ()|
|00001b70| 3b 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 6d 61 |;.static| void ma|
|00001b80| 72 6b 5f 6c 69 66 65 20 | 28 29 3b 0d 73 74 61 74 |rk_life |();.stat|
|00001b90| 69 63 20 76 6f 69 64 20 | 70 6f 73 74 5f 6d 61 72 |ic void |post_mar|
|00001ba0| 6b 5f 6c 69 66 65 20 28 | 29 3b 0d 73 74 61 74 69 |k_life (|);.stati|
|00001bb0| 63 20 69 6e 74 20 71 74 | 79 5f 63 6f 6d 70 61 72 |c int qt|y_compar|
|00001bc0| 65 20 28 29 3b 0d 73 74 | 61 74 69 63 20 69 6e 74 |e ();.st|atic int|
|00001bd0| 20 71 74 79 5f 63 6f 6d | 70 61 72 65 5f 31 20 28 | qty_com|pare_1 (|
|00001be0| 29 3b 0d 73 74 61 74 69 | 63 20 69 6e 74 20 72 65 |);.stati|c int re|
|00001bf0| 67 5f 6d 65 65 74 73 5f | 63 6c 61 73 73 5f 70 20 |g_meets_|class_p |
|00001c00| 28 29 3b 0d 73 74 61 74 | 69 63 20 69 6e 74 20 72 |();.stat|ic int r|
|00001c10| 65 67 5f 63 6c 61 73 73 | 5f 73 75 62 73 65 74 5f |eg_class|_subset_|
|00001c20| 70 20 28 29 3b 0d 73 74 | 61 74 69 63 20 76 6f 69 |p ();.st|atic voi|
|00001c30| 64 20 75 70 64 61 74 65 | 5f 71 74 79 5f 63 6c 61 |d update|_qty_cla|
|00001c40| 73 73 20 28 29 3b 0d 0c | 0d 2f 2a 20 41 6c 6c 6f |ss ();..|./* Allo|
|00001c50| 63 61 74 65 20 61 20 6e | 65 77 20 71 75 61 6e 74 |cate a n|ew quant|
|00001c60| 69 74 79 20 28 6e 65 77 | 20 77 69 74 68 69 6e 20 |ity (new| within |
|00001c70| 63 75 72 72 65 6e 74 20 | 62 61 73 69 63 20 62 6c |current |basic bl|
|00001c80| 6f 63 6b 29 0d 20 20 20 | 66 6f 72 20 72 65 67 69 |ock). |for regi|
|00001c90| 73 74 65 72 20 6e 75 6d | 62 65 72 20 52 45 47 4e |ster num|ber REGN|
|00001ca0| 4f 20 77 68 69 63 68 20 | 69 73 20 62 6f 72 6e 20 |O which |is born |
|00001cb0| 69 6e 20 69 6e 73 6e 20 | 6e 75 6d 62 65 72 20 49 |in insn |number I|
|00001cc0| 4e 53 4e 5f 4e 55 4d 42 | 45 52 0d 20 20 20 77 69 |NSN_NUMB|ER. wi|
|00001cd0| 74 68 69 6e 20 74 68 65 | 20 62 6c 6f 63 6b 2e 20 |thin the| block. |
|00001ce0| 20 4d 4f 44 45 20 61 6e | 64 20 53 49 5a 45 20 61 | MODE an|d SIZE a|
|00001cf0| 72 65 20 69 6e 66 6f 20 | 6f 6e 20 72 65 67 20 52 |re info |on reg R|
|00001d00| 45 47 4e 4f 2e 20 20 2a | 2f 0d 0d 73 74 61 74 69 |EGNO. *|/..stati|
|00001d10| 63 20 76 6f 69 64 0d 61 | 6c 6c 6f 63 5f 71 74 79 |c void.a|lloc_qty|
|00001d20| 20 28 72 65 67 6e 6f 2c | 20 6d 6f 64 65 2c 20 73 | (regno,| mode, s|
|00001d30| 69 7a 65 2c 20 69 6e 73 | 6e 5f 6e 75 6d 62 65 72 |ize, ins|n_number|
|00001d40| 29 0d 20 20 20 20 20 69 | 6e 74 20 72 65 67 6e 6f |). i|nt regno|
|00001d50| 3b 0d 20 20 20 20 20 65 | 6e 75 6d 20 6d 61 63 68 |;. e|num mach|
|00001d60| 69 6e 65 5f 6d 6f 64 65 | 20 6d 6f 64 65 3b 0d 20 |ine_mode| mode;. |
|00001d70| 20 20 20 20 69 6e 74 20 | 73 69 7a 65 2c 20 69 6e | int |size, in|
|00001d80| 73 6e 5f 6e 75 6d 62 65 | 72 3b 0d 7b 0d 20 20 72 |sn_numbe|r;.{. r|
|00001d90| 65 67 69 73 74 65 72 20 | 69 6e 74 20 71 74 79 20 |egister |int qty |
|00001da0| 3d 20 6e 65 78 74 5f 71 | 74 79 2b 2b 3b 0d 20 20 |= next_q|ty++;. |
|00001db0| 72 65 67 5f 71 74 79 5b | 72 65 67 6e 6f 5d 20 3d |reg_qty[|regno] =|
|00001dc0| 20 71 74 79 3b 0d 20 20 | 72 65 67 5f 6f 66 66 73 | qty;. |reg_offs|
|00001dd0| 65 74 5b 72 65 67 6e 6f | 5d 20 3d 20 30 3b 0d 20 |et[regno|] = 0;. |
|00001de0| 20 71 74 79 5f 73 69 7a | 65 5b 71 74 79 5d 20 3d | qty_siz|e[qty] =|
|00001df0| 20 73 69 7a 65 3b 0d 20 | 20 71 74 79 5f 6d 6f 64 | size;. | qty_mod|
|00001e00| 65 5b 71 74 79 5d 20 3d | 20 6d 6f 64 65 3b 0d 20 |e[qty] =| mode;. |
|00001e10| 20 71 74 79 5f 62 69 72 | 74 68 5b 71 74 79 5d 20 | qty_bir|th[qty] |
|00001e20| 3d 20 69 6e 73 6e 5f 6e | 75 6d 62 65 72 3b 0d 20 |= insn_n|umber;. |
|00001e30| 20 71 74 79 5f 6e 5f 63 | 61 6c 6c 73 5f 63 72 6f | qty_n_c|alls_cro|
|00001e40| 73 73 65 64 5b 71 74 79 | 5d 20 3d 20 72 65 67 5f |ssed[qty|] = reg_|
|00001e50| 6e 5f 63 61 6c 6c 73 5f | 63 72 6f 73 73 65 64 5b |n_calls_|crossed[|
|00001e60| 72 65 67 6e 6f 5d 3b 0d | 20 20 71 74 79 5f 6d 69 |regno];.| qty_mi|
|00001e70| 6e 5f 63 6c 61 73 73 5b | 71 74 79 5d 20 3d 20 72 |n_class[|qty] = r|
|00001e80| 65 67 5f 70 72 65 66 65 | 72 72 65 64 5f 63 6c 61 |eg_prefe|rred_cla|
|00001e90| 73 73 20 28 72 65 67 6e | 6f 29 3b 0d 20 20 71 74 |ss (regn|o);. qt|
|00001ea0| 79 5f 70 72 65 66 65 72 | 72 65 64 5f 6f 72 5f 6e |y_prefer|red_or_n|
|00001eb0| 6f 74 68 69 6e 67 5b 71 | 74 79 5d 20 3d 20 72 65 |othing[q|ty] = re|
|00001ec0| 67 5f 70 72 65 66 65 72 | 72 65 64 5f 6f 72 5f 6e |g_prefer|red_or_n|
|00001ed0| 6f 74 68 69 6e 67 20 28 | 72 65 67 6e 6f 29 3b 0d |othing (|regno);.|
|00001ee0| 20 20 71 74 79 5f 6e 5f | 72 65 66 73 5b 71 74 79 | qty_n_|refs[qty|
|00001ef0| 5d 20 3d 20 72 65 67 5f | 6e 5f 72 65 66 73 5b 72 |] = reg_|n_refs[r|
|00001f00| 65 67 6e 6f 5d 3b 0d 7d | 0d 0c 0d 2f 2a 20 4d 61 |egno];.}|.../* Ma|
|00001f10| 69 6e 20 65 6e 74 72 79 | 20 70 6f 69 6e 74 20 6f |in entry| point o|
|00001f20| 66 20 74 68 69 73 20 66 | 69 6c 65 2e 20 20 2a 2f |f this f|ile. */|
|00001f30| 0d 0d 76 6f 69 64 0d 6c | 6f 63 61 6c 5f 61 6c 6c |..void.l|ocal_all|
|00001f40| 6f 63 20 28 29 0d 7b 0d | 20 20 72 65 67 69 73 74 |oc ().{.| regist|
|00001f50| 65 72 20 69 6e 74 20 62 | 2c 20 69 3b 0d 0d 20 20 |er int b|, i;.. |
|00001f60| 2f 2a 20 41 6c 6c 6f 63 | 61 74 65 20 76 65 63 74 |/* Alloc|ate vect|
|00001f70| 6f 72 73 20 6f 66 20 74 | 65 6d 70 6f 72 61 72 79 |ors of t|emporary|
|00001f80| 20 64 61 74 61 2e 0d 20 | 20 20 20 20 53 65 65 20 | data.. | See |
|00001f90| 74 68 65 20 64 65 63 6c | 61 72 61 74 69 6f 6e 73 |the decl|arations|
|00001fa0| 20 6f 66 20 74 68 65 73 | 65 20 76 61 72 69 61 62 | of thes|e variab|
|00001fb0| 6c 65 73 2c 20 61 62 6f | 76 65 2c 0d 20 20 20 20 |les, abo|ve,. |
|00001fc0| 20 66 6f 72 20 77 68 61 | 74 20 74 68 65 79 20 6d | for wha|t they m|
|00001fd0| 65 61 6e 2e 20 20 2a 2f | 0d 0d 20 20 71 74 79 5f |ean. */|.. qty_|
|00001fe0| 70 68 79 73 5f 72 65 67 | 20 3d 20 28 73 68 6f 72 |phys_reg| = (shor|
|00001ff0| 74 20 2a 29 20 61 6c 6c | 6f 63 61 20 28 6d 61 78 |t *) all|oca (max|
|00002000| 5f 72 65 67 6e 6f 20 2a | 20 73 69 7a 65 6f 66 20 |_regno *| sizeof |
|00002010| 28 73 68 6f 72 74 29 29 | 3b 0d 20 20 71 74 79 5f |(short))|;. qty_|
|00002020| 70 68 79 73 5f 73 75 67 | 67 20 3d 20 28 73 68 6f |phys_sug|g = (sho|
|00002030| 72 74 20 2a 29 20 61 6c | 6c 6f 63 61 20 28 6d 61 |rt *) al|loca (ma|
|00002040| 78 5f 72 65 67 6e 6f 20 | 2a 20 73 69 7a 65 6f 66 |x_regno |* sizeof|
|00002050| 20 28 73 68 6f 72 74 29 | 29 3b 0d 20 20 71 74 79 | (short)|);. qty|
|00002060| 5f 62 69 72 74 68 20 3d | 20 28 69 6e 74 20 2a 29 |_birth =| (int *)|
|00002070| 20 61 6c 6c 6f 63 61 20 | 28 6d 61 78 5f 72 65 67 | alloca |(max_reg|
|00002080| 6e 6f 20 2a 20 73 69 7a | 65 6f 66 20 28 69 6e 74 |no * siz|eof (int|
|00002090| 29 29 3b 0d 20 20 71 74 | 79 5f 64 65 61 74 68 20 |));. qt|y_death |
|000020a0| 3d 20 28 69 6e 74 20 2a | 29 20 61 6c 6c 6f 63 61 |= (int *|) alloca|
|000020b0| 20 28 6d 61 78 5f 72 65 | 67 6e 6f 20 2a 20 73 69 | (max_re|gno * si|
|000020c0| 7a 65 6f 66 20 28 69 6e | 74 29 29 3b 0d 20 20 71 |zeof (in|t));. q|
|000020d0| 74 79 5f 73 69 7a 65 20 | 3d 20 28 69 6e 74 20 2a |ty_size |= (int *|
|000020e0| 29 20 61 6c 6c 6f 63 61 | 20 28 6d 61 78 5f 72 65 |) alloca| (max_re|
|000020f0| 67 6e 6f 20 2a 20 73 69 | 7a 65 6f 66 20 28 69 6e |gno * si|zeof (in|
|00002100| 74 29 29 3b 0d 20 20 71 | 74 79 5f 6d 6f 64 65 20 |t));. q|ty_mode |
|00002110| 3d 20 28 65 6e 75 6d 20 | 6d 61 63 68 69 6e 65 5f |= (enum |machine_|
|00002120| 6d 6f 64 65 20 2a 29 20 | 61 6c 6c 6f 63 61 20 28 |mode *) |alloca (|
|00002130| 6d 61 78 5f 72 65 67 6e | 6f 20 2a 20 73 69 7a 65 |max_regn|o * size|
|00002140| 6f 66 20 28 65 6e 75 6d | 20 6d 61 63 68 69 6e 65 |of (enum| machine|
|00002150| 5f 6d 6f 64 65 29 29 3b | 0d 20 20 71 74 79 5f 6e |_mode));|. qty_n|
|00002160| 5f 63 61 6c 6c 73 5f 63 | 72 6f 73 73 65 64 20 3d |_calls_c|rossed =|
|00002170| 20 28 69 6e 74 20 2a 29 | 20 61 6c 6c 6f 63 61 20 | (int *)| alloca |
|00002180| 28 6d 61 78 5f 72 65 67 | 6e 6f 20 2a 20 73 69 7a |(max_reg|no * siz|
|00002190| 65 6f 66 20 28 69 6e 74 | 29 29 3b 0d 20 20 71 74 |eof (int|));. qt|
|000021a0| 79 5f 6d 69 6e 5f 63 6c | 61 73 73 20 3d 20 28 65 |y_min_cl|ass = (e|
|000021b0| 6e 75 6d 20 72 65 67 5f | 63 6c 61 73 73 20 2a 29 |num reg_|class *)|
|000021c0| 20 61 6c 6c 6f 63 61 20 | 28 6d 61 78 5f 72 65 67 | alloca |(max_reg|
|000021d0| 6e 6f 20 2a 20 73 69 7a | 65 6f 66 20 28 65 6e 75 |no * siz|eof (enu|
|000021e0| 6d 20 72 65 67 5f 63 6c | 61 73 73 29 29 3b 0d 20 |m reg_cl|ass));. |
|000021f0| 20 71 74 79 5f 70 72 65 | 66 65 72 72 65 64 5f 6f | qty_pre|ferred_o|
|00002200| 72 5f 6e 6f 74 68 69 6e | 67 20 3d 20 28 63 68 61 |r_nothin|g = (cha|
|00002210| 72 20 2a 29 20 61 6c 6c | 6f 63 61 20 28 6d 61 78 |r *) all|oca (max|
|00002220| 5f 72 65 67 6e 6f 29 3b | 0d 20 20 71 74 79 5f 6e |_regno);|. qty_n|
|00002230| 5f 72 65 66 73 20 3d 20 | 28 73 68 6f 72 74 20 2a |_refs = |(short *|
|00002240| 29 20 61 6c 6c 6f 63 61 | 20 28 6d 61 78 5f 72 65 |) alloca| (max_re|
|00002250| 67 6e 6f 20 2a 20 73 69 | 7a 65 6f 66 20 28 73 68 |gno * si|zeof (sh|
|00002260| 6f 72 74 29 29 3b 0d 0d | 20 20 72 65 67 5f 71 74 |ort));..| reg_qt|
|00002270| 79 20 3d 20 28 69 6e 74 | 20 2a 29 20 61 6c 6c 6f |y = (int| *) allo|
|00002280| 63 61 20 28 6d 61 78 5f | 72 65 67 6e 6f 20 2a 20 |ca (max_|regno * |
|00002290| 73 69 7a 65 6f 66 20 28 | 69 6e 74 29 29 3b 0d 20 |sizeof (|int));. |
|000022a0| 20 72 65 67 5f 6f 66 66 | 73 65 74 20 3d 20 28 69 | reg_off|set = (i|
|000022b0| 6e 74 20 2a 29 20 61 6c | 6c 6f 63 61 20 28 6d 61 |nt *) al|loca (ma|
|000022c0| 78 5f 72 65 67 6e 6f 20 | 2a 20 73 69 7a 65 6f 66 |x_regno |* sizeof|
|000022d0| 20 28 69 6e 74 29 29 3b | 0d 0d 20 20 72 65 67 5f | (int));|.. reg_|
|000022e0| 72 65 6e 75 6d 62 65 72 | 20 3d 20 28 73 68 6f 72 |renumber| = (shor|
|000022f0| 74 20 2a 29 20 6f 62 61 | 6c 6c 6f 63 20 28 6d 61 |t *) oba|lloc (ma|
|00002300| 78 5f 72 65 67 6e 6f 20 | 2a 20 73 69 7a 65 6f 66 |x_regno |* sizeof|
|00002310| 20 28 73 68 6f 72 74 29 | 29 3b 0d 20 20 66 6f 72 | (short)|);. for|
|00002320| 20 28 69 20 3d 20 30 3b | 20 69 20 3c 20 6d 61 78 | (i = 0;| i < max|
|00002330| 5f 72 65 67 6e 6f 3b 20 | 69 2b 2b 29 0d 20 20 20 |_regno; |i++). |
|00002340| 20 72 65 67 5f 72 65 6e | 75 6d 62 65 72 5b 69 5d | reg_ren|umber[i]|
|00002350| 20 3d 20 2d 31 3b 0d 0d | 20 20 2f 2a 20 54 68 69 | = -1;..| /* Thi|
|00002360| 73 20 63 6f 6e 74 72 6f | 6c 73 20 6f 6e 6c 79 20 |s contro|ls only |
|00002370| 68 6f 77 20 6d 61 6e 79 | 20 65 6c 74 73 20 6f 66 |how many| elts of|
|00002380| 20 74 68 65 20 60 71 74 | 79 5f 2e 2e 2e 27 20 76 | the `qt|y_...' v|
|00002390| 65 63 74 6f 72 73 0d 20 | 20 20 20 20 6e 65 65 64 |ectors. | need|
|000023a0| 20 74 6f 20 62 65 20 7a | 65 72 6f 20 66 6f 72 20 | to be z|ero for |
|000023b0| 74 68 65 20 66 69 72 73 | 74 20 62 61 73 69 63 20 |the firs|t basic |
|000023c0| 62 6c 6f 63 6b 2e 20 20 | 2a 2f 0d 20 20 6e 65 78 |block. |*/. nex|
|000023d0| 74 5f 71 74 79 20 3d 20 | 6d 61 78 5f 72 65 67 6e |t_qty = |max_regn|
|000023e0| 6f 3b 0d 0d 20 20 2f 2a | 20 41 6c 6c 6f 63 61 74 |o;.. /*| Allocat|
|000023f0| 65 20 65 61 63 68 20 62 | 6c 6f 63 6b 27 73 20 6c |e each b|lock's l|
|00002400| 6f 63 61 6c 20 72 65 67 | 69 73 74 65 72 73 2c 20 |ocal reg|isters, |
|00002410| 62 6c 6f 63 6b 20 62 79 | 20 62 6c 6f 63 6b 2e 20 |block by| block. |
|00002420| 20 2a 2f 0d 0d 20 20 66 | 6f 72 20 28 62 20 3d 20 | */.. f|or (b = |
|00002430| 30 3b 20 62 20 3c 20 6e | 5f 62 61 73 69 63 5f 62 |0; b < n|_basic_b|
|00002440| 6c 6f 63 6b 73 3b 20 62 | 2b 2b 29 0d 20 20 20 20 |locks; b|++). |
|00002450| 7b 0d 0d 23 69 66 64 65 | 66 20 4d 50 57 0d 20 20 |{..#ifde|f MPW. |
|00002460| 20 20 53 70 69 6e 43 75 | 72 73 6f 72 28 31 29 3b | SpinCu|rsor(1);|
|00002470| 0d 23 65 6e 64 69 66 0d | 0d 20 20 20 20 66 6f 72 |.#endif.|. for|
|00002480| 20 28 69 20 3d 20 30 3b | 20 69 20 3c 20 46 49 52 | (i = 0;| i < FIR|
|00002490| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|000024a0| 45 52 3b 20 69 2b 2b 29 | 0d 09 7b 0d 09 20 20 72 |ER; i++)|..{.. r|
|000024b0| 65 67 5f 71 74 79 5b 69 | 5d 20 3d 20 2d 31 3b 0d |eg_qty[i|] = -1;.|
|000024c0| 09 7d 0d 20 20 20 20 66 | 6f 72 20 28 69 20 3d 20 |.}. f|or (i = |
|000024d0| 46 49 52 53 54 5f 50 53 | 45 55 44 4f 5f 52 45 47 |FIRST_PS|EUDO_REG|
|000024e0| 49 53 54 45 52 3b 20 69 | 20 3c 20 6d 61 78 5f 72 |ISTER; i| < max_r|
|000024f0| 65 67 6e 6f 3b 20 69 2b | 2b 29 0d 09 7b 0d 09 20 |egno; i+|+)..{.. |
|00002500| 20 71 74 79 5f 70 68 79 | 73 5f 73 75 67 67 5b 69 | qty_phy|s_sugg[i|
|00002510| 5d 20 3d 20 2d 31 3b 0d | 09 20 20 71 74 79 5f 62 |] = -1;.|. qty_b|
|00002520| 69 72 74 68 5b 69 5d 20 | 3d 20 2d 31 3b 0d 09 20 |irth[i] |= -1;.. |
|00002530| 20 71 74 79 5f 64 65 61 | 74 68 5b 69 5d 20 3d 20 | qty_dea|th[i] = |
|00002540| 2d 31 3b 0d 09 20 20 2f | 2a 20 53 65 74 20 72 65 |-1;.. /|* Set re|
|00002550| 67 5f 71 74 79 20 74 6f | 20 2d 32 20 66 6f 72 20 |g_qty to| -2 for |
|00002560| 70 73 65 75 64 6f 73 20 | 69 6e 20 74 68 69 73 20 |pseudos |in this |
|00002570| 62 6c 6f 63 6b 2c 20 2d | 31 20 66 6f 72 20 6f 74 |block, -|1 for ot|
|00002580| 68 65 72 73 2e 20 20 2a | 2f 0d 09 20 20 69 66 20 |hers. *|/.. if |
|00002590| 28 72 65 67 5f 62 61 73 | 69 63 5f 62 6c 6f 63 6b |(reg_bas|ic_block|
|000025a0| 5b 69 5d 20 3d 3d 20 62 | 20 26 26 20 72 65 67 5f |[i] == b| && reg_|
|000025b0| 6e 5f 64 65 61 74 68 73 | 5b 69 5d 20 3d 3d 20 31 |n_deaths|[i] == 1|
|000025c0| 29 0d 09 20 20 20 20 72 | 65 67 5f 71 74 79 5b 69 |).. r|eg_qty[i|
|000025d0| 5d 20 3d 20 2d 32 3b 0d | 09 20 20 65 6c 73 65 0d |] = -2;.|. else.|
|000025e0| 09 20 20 20 20 72 65 67 | 5f 71 74 79 5b 69 5d 20 |. reg|_qty[i] |
|000025f0| 3d 20 2d 31 3b 0d 09 7d | 0d 0d 20 20 20 20 20 20 |= -1;..}|.. |
|00002600| 62 7a 65 72 6f 20 28 72 | 65 67 5f 6f 66 66 73 65 |bzero (r|eg_offse|
|00002610| 74 2c 20 6d 61 78 5f 72 | 65 67 6e 6f 20 2a 20 73 |t, max_r|egno * s|
|00002620| 69 7a 65 6f 66 20 28 69 | 6e 74 29 29 3b 0d 0d 20 |izeof (i|nt));.. |
|00002630| 20 20 20 20 20 2f 2a 20 | 4e 45 58 54 5f 51 54 59 | /* |NEXT_QTY|
|00002640| 20 69 6e 64 69 63 61 74 | 65 73 20 77 68 69 63 68 | indicat|es which|
|00002650| 20 65 6c 65 6d 65 6e 74 | 73 20 6f 66 20 74 68 65 | element|s of the|
|00002660| 20 60 71 74 79 5f 2e 2e | 2e 27 0d 09 20 76 65 63 | `qty_..|.'.. vec|
|00002670| 74 6f 72 73 20 6d 69 67 | 68 74 20 6e 65 65 64 20 |tors mig|ht need |
|00002680| 74 6f 20 62 65 20 69 6e | 69 74 69 61 6c 69 7a 65 |to be in|itialize|
|00002690| 64 2e 20 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 74 |d. Init|ialize t|
|000026a0| 68 6f 73 65 2c 0d 09 20 | 77 69 74 68 20 65 78 70 |hose,.. |with exp|
|000026b0| 6c 69 63 69 74 20 6c 6f | 6f 70 20 69 66 20 74 68 |licit lo|op if th|
|000026c0| 65 72 65 20 61 72 65 20 | 66 65 77 2c 20 65 6c 73 |ere are |few, els|
|000026d0| 65 20 77 69 74 68 20 62 | 7a 65 72 6f 2e 20 20 2a |e with b|zero. *|
|000026e0| 2f 0d 0d 20 20 20 20 20 | 20 69 66 20 28 6e 65 78 |/.. | if (nex|
|000026f0| 74 5f 71 74 79 20 3c 20 | 46 49 52 53 54 5f 50 53 |t_qty < |FIRST_PS|
|00002700| 45 55 44 4f 5f 52 45 47 | 49 53 54 45 52 20 2b 20 |EUDO_REG|ISTER + |
|00002710| 36 29 0d 09 7b 0d 09 20 | 20 66 6f 72 20 28 69 20 |6)..{.. | for (i |
|00002720| 3d 20 46 49 52 53 54 5f | 50 53 45 55 44 4f 5f 52 |= FIRST_|PSEUDO_R|
|00002730| 45 47 49 53 54 45 52 3b | 20 69 20 3c 20 6e 65 78 |EGISTER;| i < nex|
|00002740| 74 5f 71 74 79 3b 20 69 | 2b 2b 29 0d 09 20 20 20 |t_qty; i|++).. |
|00002750| 20 7b 0d 09 20 20 20 20 | 20 20 71 74 79 5f 73 69 | {.. | qty_si|
|00002760| 7a 65 5b 69 5d 20 3d 20 | 30 3b 0d 09 20 20 20 20 |ze[i] = |0;.. |
|00002770| 20 20 71 74 79 5f 6d 6f | 64 65 5b 69 5d 20 3d 20 | qty_mo|de[i] = |
|00002780| 56 4f 49 44 6d 6f 64 65 | 3b 0d 09 20 20 20 20 20 |VOIDmode|;.. |
|00002790| 20 71 74 79 5f 6d 69 6e | 5f 63 6c 61 73 73 5b 69 | qty_min|_class[i|
|000027a0| 5d 20 3d 20 4e 4f 5f 52 | 45 47 53 3b 0d 09 20 20 |] = NO_R|EGS;.. |
|000027b0| 20 20 20 20 71 74 79 5f | 70 72 65 66 65 72 72 65 | qty_|preferre|
|000027c0| 64 5f 6f 72 5f 6e 6f 74 | 68 69 6e 67 5b 69 5d 20 |d_or_not|hing[i] |
|000027d0| 3d 20 30 3b 0d 09 20 20 | 20 20 20 20 71 74 79 5f |= 0;.. | qty_|
|000027e0| 6e 5f 63 61 6c 6c 73 5f | 63 72 6f 73 73 65 64 5b |n_calls_|crossed[|
|000027f0| 69 5d 20 3d 20 30 3b 0d | 09 20 20 20 20 20 20 71 |i] = 0;.|. q|
|00002800| 74 79 5f 6e 5f 72 65 66 | 73 5b 69 5d 20 3d 20 30 |ty_n_ref|s[i] = 0|
|00002810| 3b 0d 09 20 20 20 20 7d | 0d 09 7d 0d 20 20 20 20 |;.. }|..}. |
|00002820| 20 20 65 6c 73 65 0d 09 | 7b 0d 09 20 20 69 6e 74 | else..|{.. int|
|00002830| 20 63 6c 65 61 72 5f 6c | 65 6e 67 74 68 20 3d 20 | clear_l|ength = |
|00002840| 6e 65 78 74 5f 71 74 79 | 20 2d 20 46 49 52 53 54 |next_qty| - FIRST|
|00002850| 5f 50 53 45 55 44 4f 5f | 52 45 47 49 53 54 45 52 |_PSEUDO_|REGISTER|
|00002860| 3b 0d 0d 23 64 65 66 69 | 6e 65 20 43 4c 45 41 52 |;..#defi|ne CLEAR|
|00002870| 28 76 65 63 74 6f 72 29 | 20 20 5c 0d 20 20 20 62 |(vector)| \. b|
|00002880| 7a 65 72 6f 20 28 28 76 | 65 63 74 6f 72 29 20 2b |zero ((v|ector) +|
|00002890| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|000028a0| 47 49 53 54 45 52 2c 20 | 20 20 20 5c 0d 09 20 20 |GISTER, | \.. |
|000028b0| 28 73 69 7a 65 6f 66 20 | 28 2a 28 76 65 63 74 6f |(sizeof |(*(vecto|
|000028c0| 72 29 29 29 20 2a 20 63 | 6c 65 61 72 5f 6c 65 6e |r))) * c|lear_len|
|000028d0| 67 74 68 29 0d 0d 09 20 | 20 43 4c 45 41 52 20 28 |gth)... | CLEAR (|
|000028e0| 71 74 79 5f 73 69 7a 65 | 29 3b 0d 09 20 20 43 4c |qty_size|);.. CL|
|000028f0| 45 41 52 20 28 71 74 79 | 5f 6d 6f 64 65 29 3b 0d |EAR (qty|_mode);.|
|00002900| 09 20 20 43 4c 45 41 52 | 20 28 71 74 79 5f 6d 69 |. CLEAR| (qty_mi|
|00002910| 6e 5f 63 6c 61 73 73 29 | 3b 0d 09 20 20 43 4c 45 |n_class)|;.. CLE|
|00002920| 41 52 20 28 71 74 79 5f | 70 72 65 66 65 72 72 65 |AR (qty_|preferre|
|00002930| 64 5f 6f 72 5f 6e 6f 74 | 68 69 6e 67 29 3b 0d 09 |d_or_not|hing);..|
|00002940| 20 20 43 4c 45 41 52 20 | 28 71 74 79 5f 6e 5f 63 | CLEAR |(qty_n_c|
|00002950| 61 6c 6c 73 5f 63 72 6f | 73 73 65 64 29 3b 0d 09 |alls_cro|ssed);..|
|00002960| 20 20 43 4c 45 41 52 20 | 28 71 74 79 5f 6e 5f 72 | CLEAR |(qty_n_r|
|00002970| 65 66 73 29 3b 0d 09 7d | 0d 0d 20 20 20 20 20 20 |efs);..}|.. |
|00002980| 6e 65 78 74 5f 71 74 79 | 20 3d 20 46 49 52 53 54 |next_qty| = FIRST|
|00002990| 5f 50 53 45 55 44 4f 5f | 52 45 47 49 53 54 45 52 |_PSEUDO_|REGISTER|
|000029a0| 3b 0d 0d 20 20 20 20 20 | 20 62 6c 6f 63 6b 5f 61 |;.. | block_a|
|000029b0| 6c 6c 6f 63 20 28 62 29 | 3b 0d 23 69 66 64 65 66 |lloc (b)|;.#ifdef|
|000029c0| 20 55 53 45 5f 43 5f 41 | 4c 4c 4f 43 41 0d 20 20 | USE_C_A|LLOCA. |
|000029d0| 20 20 20 20 61 6c 6c 6f | 63 61 20 28 30 29 3b 0d | allo|ca (0);.|
|000029e0| 23 65 6e 64 69 66 0d 20 | 20 20 20 7d 0d 7d 0d 0c |#endif. | }.}..|
|000029f0| 0d 2f 2a 20 41 6c 6c 6f | 63 61 74 65 20 68 61 72 |./* Allo|cate har|
|00002a00| 64 20 72 65 67 73 20 74 | 6f 20 74 68 65 20 70 73 |d regs t|o the ps|
|00002a10| 65 75 64 6f 20 72 65 67 | 73 20 75 73 65 64 20 6f |eudo reg|s used o|
|00002a20| 6e 6c 79 20 77 69 74 68 | 69 6e 20 62 6c 6f 63 6b |nly with|in block|
|00002a30| 20 6e 75 6d 62 65 72 20 | 42 2e 0d 20 20 20 4f 6e | number |B.. On|
|00002a40| 6c 79 20 74 68 65 20 70 | 73 65 75 64 6f 73 20 74 |ly the p|seudos t|
|00002a50| 68 61 74 20 64 69 65 20 | 62 75 74 20 6f 6e 63 65 |hat die |but once|
|00002a60| 20 63 61 6e 20 62 65 20 | 68 61 6e 64 6c 65 64 2e | can be |handled.|
|00002a70| 20 20 2a 2f 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 | */..st|atic voi|
|00002a80| 64 0d 62 6c 6f 63 6b 5f | 61 6c 6c 6f 63 20 28 62 |d.block_|alloc (b|
|00002a90| 29 0d 20 20 20 20 20 69 | 6e 74 20 62 3b 0d 7b 0d |). i|nt b;.{.|
|00002aa0| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 69 | regist|er int i|
|00002ab0| 2c 20 71 3b 0d 20 20 72 | 65 67 69 73 74 65 72 20 |, q;. r|egister |
|00002ac0| 72 74 78 20 69 6e 73 6e | 3b 0d 20 20 69 6e 74 20 |rtx insn|;. int |
|00002ad0| 69 6e 73 6e 5f 6e 75 6d | 62 65 72 20 3d 20 30 3b |insn_num|ber = 0;|
|00002ae0| 0d 20 20 69 6e 74 20 69 | 6e 73 6e 5f 63 6f 75 6e |. int i|nsn_coun|
|00002af0| 74 20 3d 20 30 3b 0d 20 | 20 73 68 6f 72 74 20 2a |t = 0;. | short *|
|00002b00| 71 74 79 5f 6f 72 64 65 | 72 3b 0d 0d 20 20 63 61 |qty_orde|r;.. ca|
|00002b10| 6c 6c 5f 73 65 65 6e 20 | 3d 20 30 3b 0d 0d 20 20 |ll_seen |= 0;.. |
|00002b20| 2f 2a 20 43 6f 75 6e 74 | 20 74 68 65 20 69 6e 73 |/* Count| the ins|
|00002b30| 74 72 75 63 74 69 6f 6e | 73 20 69 6e 20 74 68 65 |truction|s in the|
|00002b40| 20 62 61 73 69 63 20 62 | 6c 6f 63 6b 2e 20 20 2a | basic b|lock. *|
|00002b50| 2f 0d 0d 20 20 69 6e 73 | 6e 20 3d 20 62 61 73 69 |/.. ins|n = basi|
|00002b60| 63 5f 62 6c 6f 63 6b 5f | 65 6e 64 5b 62 5d 3b 0d |c_block_|end[b];.|
|00002b70| 20 20 77 68 69 6c 65 20 | 28 31 29 0d 20 20 20 20 | while |(1). |
|00002b80| 7b 0d 20 20 20 20 20 20 | 69 66 20 28 47 45 54 5f |{. |if (GET_|
|00002b90| 43 4f 44 45 20 28 69 6e | 73 6e 29 20 21 3d 20 4e |CODE (in|sn) != N|
|00002ba0| 4f 54 45 29 0d 09 69 6e | 73 6e 5f 63 6f 75 6e 74 |OTE)..in|sn_count|
|00002bb0| 2b 2b 3b 0d 20 20 20 20 | 20 20 69 66 20 28 69 6e |++;. | if (in|
|00002bc0| 73 6e 20 3d 3d 20 62 61 | 73 69 63 5f 62 6c 6f 63 |sn == ba|sic_bloc|
|00002bd0| 6b 5f 68 65 61 64 5b 62 | 5d 29 0d 09 62 72 65 61 |k_head[b|])..brea|
|00002be0| 6b 3b 0d 20 20 20 20 20 | 20 69 6e 73 6e 20 3d 20 |k;. | insn = |
|00002bf0| 50 52 45 56 5f 49 4e 53 | 4e 20 28 69 6e 73 6e 29 |PREV_INS|N (insn)|
|00002c00| 3b 0d 20 20 20 20 7d 0d | 0d 20 20 2f 2a 20 2b 31 |;. }.|. /* +1|
|00002c10| 20 74 6f 20 6c 65 61 76 | 65 20 72 6f 6f 6d 20 66 | to leav|e room f|
|00002c20| 6f 72 20 61 20 70 6f 73 | 74 5f 6d 61 72 6b 5f 6c |or a pos|t_mark_l|
|00002c30| 69 66 65 20 61 74 20 74 | 68 65 20 6c 61 73 74 20 |ife at t|he last |
|00002c40| 69 6e 73 6e 2e 20 20 2a | 2f 0d 20 20 72 65 67 73 |insn. *|/. regs|
|00002c50| 5f 6c 69 76 65 5f 61 74 | 20 3d 20 28 48 41 52 44 |_live_at| = (HARD|
|00002c60| 5f 52 45 47 5f 53 45 54 | 20 2a 29 20 61 6c 6c 6f |_REG_SET| *) allo|
|00002c70| 63 61 20 28 28 69 6e 73 | 6e 5f 63 6f 75 6e 74 20 |ca ((ins|n_count |
|00002c80| 2b 20 31 29 0d 09 09 09 | 09 09 20 20 2a 20 73 69 |+ 1)....|.. * si|
|00002c90| 7a 65 6f 66 20 28 48 41 | 52 44 5f 52 45 47 5f 53 |zeof (HA|RD_REG_S|
|00002ca0| 45 54 29 29 3b 0d 20 20 | 62 7a 65 72 6f 20 28 72 |ET));. |bzero (r|
|00002cb0| 65 67 73 5f 6c 69 76 65 | 5f 61 74 2c 20 28 69 6e |egs_live|_at, (in|
|00002cc0| 73 6e 5f 63 6f 75 6e 74 | 20 2b 20 31 29 20 2a 20 |sn_count| + 1) * |
|00002cd0| 73 69 7a 65 6f 66 20 28 | 48 41 52 44 5f 52 45 47 |sizeof (|HARD_REG|
|00002ce0| 5f 53 45 54 29 29 3b 0d | 0d 20 20 2f 2a 20 49 6e |_SET));.|. /* In|
|00002cf0| 69 74 69 61 6c 69 7a 65 | 20 74 61 62 6c 65 20 6f |itialize| table o|
|00002d00| 66 20 68 61 72 64 77 61 | 72 65 20 72 65 67 69 73 |f hardwa|re regis|
|00002d10| 74 65 72 73 20 63 75 72 | 72 65 6e 74 6c 79 20 6c |ters cur|rently l|
|00002d20| 69 76 65 2e 20 20 2a 2f | 0d 0d 23 69 66 64 65 66 |ive. */|..#ifdef|
|00002d30| 20 48 41 52 44 5f 52 45 | 47 5f 53 45 54 0d 20 20 | HARD_RE|G_SET. |
|00002d40| 72 65 67 73 5f 6c 69 76 | 65 20 3d 20 2a 62 61 73 |regs_liv|e = *bas|
|00002d50| 69 63 5f 62 6c 6f 63 6b | 5f 6c 69 76 65 5f 61 74 |ic_block|_live_at|
|00002d60| 5f 73 74 61 72 74 5b 62 | 5d 3b 0d 23 65 6c 73 65 |_start[b|];.#else|
|00002d70| 0d 20 20 43 4f 50 59 5f | 48 41 52 44 5f 52 45 47 |. COPY_|HARD_REG|
|00002d80| 5f 53 45 54 20 28 72 65 | 67 73 5f 6c 69 76 65 2c |_SET (re|gs_live,|
|00002d90| 20 62 61 73 69 63 5f 62 | 6c 6f 63 6b 5f 6c 69 76 | basic_b|lock_liv|
|00002da0| 65 5f 61 74 5f 73 74 61 | 72 74 5b 62 5d 29 3b 0d |e_at_sta|rt[b]);.|
|00002db0| 23 65 6e 64 69 66 0d 0d | 20 20 2f 2a 20 54 68 69 |#endif..| /* Thi|
|00002dc0| 73 20 6c 6f 6f 70 20 73 | 63 61 6e 73 20 74 68 65 |s loop s|cans the|
|00002dd0| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 20 6f 66 | instruc|tions of|
|00002de0| 20 74 68 65 20 62 61 73 | 69 63 20 62 6c 6f 63 6b | the bas|ic block|
|00002df0| 0d 20 20 20 20 20 61 6e | 64 20 61 73 73 69 67 6e |. an|d assign|
|00002e00| 73 20 71 75 61 6e 74 69 | 74 69 65 73 20 74 6f 20 |s quanti|ties to |
|00002e10| 72 65 67 69 73 74 65 72 | 73 2e 0d 20 20 20 20 20 |register|s.. |
|00002e20| 49 74 20 63 6f 6d 70 75 | 74 65 73 20 77 68 69 63 |It compu|tes whic|
|00002e30| 68 20 72 65 67 69 73 74 | 65 72 73 20 74 6f 20 74 |h regist|ers to t|
|00002e40| 69 65 2e 20 20 2a 2f 0d | 0d 20 20 69 6e 73 6e 20 |ie. */.|. insn |
|00002e50| 3d 20 62 61 73 69 63 5f | 62 6c 6f 63 6b 5f 68 65 |= basic_|block_he|
|00002e60| 61 64 5b 62 5d 3b 0d 20 | 20 77 68 69 6c 65 20 28 |ad[b];. | while (|
|00002e70| 31 29 0d 20 20 20 20 7b | 0d 20 20 20 20 20 20 72 |1). {|. r|
|00002e80| 65 67 69 73 74 65 72 20 | 72 74 78 20 62 6f 64 79 |egister |rtx body|
|00002e90| 20 3d 20 50 41 54 54 45 | 52 4e 20 28 69 6e 73 6e | = PATTE|RN (insn|
|00002ea0| 29 3b 0d 0d 23 69 66 64 | 65 66 20 4d 50 57 0d 20 |);..#ifd|ef MPW. |
|00002eb0| 20 20 20 20 20 53 70 69 | 6e 43 75 72 73 6f 72 28 | Spi|nCursor(|
|00002ec0| 31 29 3b 0d 23 65 6e 64 | 69 66 0d 0d 20 20 20 20 |1);.#end|if.. |
|00002ed0| 20 20 69 66 20 28 47 45 | 54 5f 43 4f 44 45 20 28 | if (GE|T_CODE (|
|00002ee0| 69 6e 73 6e 29 20 21 3d | 20 4e 4f 54 45 29 0d 09 |insn) !=| NOTE)..|
|00002ef0| 69 6e 73 6e 5f 6e 75 6d | 62 65 72 2b 2b 3b 0d 0d |insn_num|ber++;..|
|00002f00| 20 20 20 20 20 20 69 66 | 20 28 47 45 54 5f 43 4f | if| (GET_CO|
|00002f10| 44 45 20 28 69 6e 73 6e | 29 20 3d 3d 20 49 4e 53 |DE (insn|) == INS|
|00002f20| 4e 20 7c 7c 20 47 45 54 | 5f 43 4f 44 45 20 28 69 |N || GET|_CODE (i|
|00002f30| 6e 73 6e 29 20 3d 3d 20 | 4a 55 4d 50 5f 49 4e 53 |nsn) == |JUMP_INS|
|00002f40| 4e 0d 09 20 20 7c 7c 20 | 47 45 54 5f 43 4f 44 45 |N.. || |GET_CODE|
|00002f50| 20 28 69 6e 73 6e 29 20 | 3d 3d 20 43 41 4c 4c 5f | (insn) |== CALL_|
|00002f60| 49 4e 53 4e 29 0d 09 7b | 0d 09 20 20 72 65 67 69 |INSN)..{|.. regi|
|00002f70| 73 74 65 72 20 72 74 78 | 20 6c 69 6e 6b 3b 0d 09 |ster rtx| link;..|
|00002f80| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 77 | regist|er int w|
|00002f90| 69 6e 20 3d 20 30 3b 0d | 09 20 20 72 65 67 69 73 |in = 0;.|. regis|
|00002fa0| 74 65 72 20 72 74 78 20 | 72 30 2c 20 72 31 3b 0d |ter rtx |r0, r1;.|
|00002fb0| 09 20 20 69 6e 74 20 63 | 6f 6d 62 69 6e 65 64 5f |. int c|ombined_|
|00002fc0| 72 65 67 6e 6f 20 3d 20 | 2d 31 3b 0d 09 20 20 69 |regno = |-1;.. i|
|00002fd0| 6e 74 20 69 6e 73 6e 5f | 63 6f 64 65 5f 6e 75 6d |nt insn_|code_num|
|00002fe0| 62 65 72 20 3d 20 72 65 | 63 6f 67 5f 6d 65 6d 6f |ber = re|cog_memo|
|00002ff0| 69 7a 65 64 20 28 69 6e | 73 6e 29 3b 0d 09 20 20 |ized (in|sn);.. |
|00003000| 69 6e 74 20 63 6f 6d 6d | 75 74 61 74 69 76 65 20 |int comm|utative |
|00003010| 3d 20 30 3b 0d 0d 09 20 | 20 74 68 69 73 5f 69 6e |= 0;... | this_in|
|00003020| 73 6e 5f 6e 75 6d 62 65 | 72 20 3d 20 69 6e 73 6e |sn_numbe|r = insn|
|00003030| 5f 6e 75 6d 62 65 72 3b | 0d 09 20 20 74 68 69 73 |_number;|.. this|
|00003040| 5f 69 6e 73 6e 20 3d 20 | 69 6e 73 6e 3b 0d 0d 09 |_insn = |insn;...|
|00003050| 20 20 2f 2a 20 53 65 74 | 20 43 4f 4d 4d 55 54 41 | /* Set| COMMUTA|
|00003060| 54 49 56 45 20 69 66 20 | 6f 70 65 72 61 6e 64 73 |TIVE if |operands|
|00003070| 20 31 20 61 6e 64 20 32 | 20 61 72 65 20 63 6f 6d | 1 and 2| are com|
|00003080| 6d 75 74 61 74 69 76 65 | 2e 20 20 2a 2f 0d 09 20 |mutative|. */.. |
|00003090| 20 69 66 20 28 69 6e 73 | 6e 5f 63 6f 64 65 5f 6e | if (ins|n_code_n|
|000030a0| 75 6d 62 65 72 20 3e 3d | 20 30 0d 09 20 20 20 20 |umber >=| 0.. |
|000030b0| 20 20 26 26 20 69 6e 73 | 6e 5f 6e 5f 6f 70 65 72 | && ins|n_n_oper|
|000030c0| 61 6e 64 73 5b 69 6e 73 | 6e 5f 63 6f 64 65 5f 6e |ands[ins|n_code_n|
|000030d0| 75 6d 62 65 72 5d 20 3e | 20 32 0d 09 20 20 20 20 |umber] >| 2.. |
|000030e0| 20 20 26 26 20 69 6e 73 | 6e 5f 6f 70 65 72 61 6e | && ins|n_operan|
|000030f0| 64 5f 63 6f 6e 73 74 72 | 61 69 6e 74 5b 69 6e 73 |d_constr|aint[ins|
|00003100| 6e 5f 63 6f 64 65 5f 6e | 75 6d 62 65 72 5d 5b 31 |n_code_n|umber][1|
|00003110| 5d 5b 30 5d 20 3d 3d 20 | 27 25 27 29 0d 09 20 20 |][0] == |'%').. |
|00003120| 20 20 63 6f 6d 6d 75 74 | 61 74 69 76 65 20 3d 20 | commut|ative = |
|00003130| 31 3b 0d 0d 09 20 20 2f | 2a 20 49 73 20 74 68 69 |1;... /|* Is thi|
|00003140| 73 20 69 6e 73 6e 20 73 | 75 69 74 61 62 6c 65 20 |s insn s|uitable |
|00003150| 66 6f 72 20 74 79 69 6e | 67 20 74 77 6f 20 72 65 |for tyin|g two re|
|00003160| 67 69 73 74 65 72 73 3f | 0d 09 20 20 20 20 20 49 |gisters?|.. I|
|00003170| 66 20 73 6f 2c 20 74 72 | 79 20 64 6f 69 6e 67 20 |f so, tr|y doing |
|00003180| 74 68 61 74 2e 0d 09 20 | 20 20 20 20 53 75 69 74 |that... | Suit|
|00003190| 61 62 6c 65 20 69 6e 73 | 6e 73 20 61 72 65 20 28 |able ins|ns are (|
|000031a0| 73 65 74 20 72 65 67 30 | 20 72 65 67 31 29 20 61 |set reg0| reg1) a|
|000031b0| 6e 64 0d 09 20 20 20 20 | 20 28 73 65 74 20 72 65 |nd.. | (set re|
|000031c0| 67 30 20 28 61 72 69 74 | 68 6f 70 20 72 65 67 31 |g0 (arit|hop reg1|
|000031d0| 20 2e 2e 2e 29 29 2e 0d | 09 20 20 20 20 20 46 6f | ...))..|. Fo|
|000031e0| 72 20 61 20 63 6f 6d 6d | 75 74 61 74 69 76 65 20 |r a comm|utative |
|000031f0| 6f 70 65 72 61 74 69 6f | 6e 2c 20 74 72 79 20 28 |operatio|n, try (|
|00003200| 73 65 74 20 72 65 67 30 | 20 28 61 72 69 74 68 6f |set reg0| (aritho|
|00003210| 70 20 2e 2e 2e 20 72 65 | 67 31 29 29 2e 0d 09 20 |p ... re|g1))... |
|00003220| 20 20 20 20 53 75 62 72 | 65 67 73 20 69 6e 20 70 | Subr|egs in p|
|00003230| 6c 61 63 65 20 6f 66 20 | 72 65 67 73 20 61 72 65 |lace of |regs are|
|00003240| 20 61 6c 73 6f 20 6f 6b | 2e 0d 09 20 20 20 20 20 | also ok|... |
|00003250| 41 6e 20 69 6e 73 6e 20 | 77 69 74 68 20 70 61 72 |An insn |with par|
|00003260| 61 6c 6c 65 6c 20 73 65 | 74 73 20 69 73 20 6f 6b |allel se|ts is ok|
|00003270| 20 69 66 20 74 68 65 20 | 66 69 72 73 74 20 73 65 | if the |first se|
|00003280| 74 20 69 73 20 73 75 69 | 74 61 62 6c 65 2e 0d 0d |t is sui|table...|
|00003290| 09 20 20 20 20 20 49 66 | 20 74 79 69 6e 67 20 69 |. If| tying i|
|000032a0| 73 20 64 6f 6e 65 2c 20 | 57 49 4e 20 69 73 20 73 |s done, |WIN is s|
|000032b0| 65 74 20 6e 6f 6e 7a 65 | 72 6f 2e 20 20 2a 2f 0d |et nonze|ro. */.|
|000032c0| 0d 09 20 20 69 66 20 28 | 47 45 54 5f 43 4f 44 45 |.. if (|GET_CODE|
|000032d0| 20 28 62 6f 64 79 29 20 | 3d 3d 20 53 45 54 0d 09 | (body) |== SET..|
|000032e0| 20 20 20 20 20 20 26 26 | 20 28 72 30 20 3d 20 53 | &&| (r0 = S|
|000032f0| 45 54 5f 44 45 53 54 20 | 28 62 6f 64 79 29 2c 0d |ET_DEST |(body),.|
|00003300| 09 09 20 20 47 45 54 5f | 43 4f 44 45 20 28 72 30 |.. GET_|CODE (r0|
|00003310| 29 20 3d 3d 20 52 45 47 | 20 7c 7c 20 47 45 54 5f |) == REG| || GET_|
|00003320| 43 4f 44 45 20 28 72 30 | 29 20 3d 3d 20 53 55 42 |CODE (r0|) == SUB|
|00003330| 52 45 47 29 0d 09 20 20 | 20 20 20 20 26 26 20 28 |REG).. | && (|
|00003340| 72 31 20 3d 20 53 45 54 | 5f 53 52 43 20 28 62 6f |r1 = SET|_SRC (bo|
|00003350| 64 79 29 2c 0d 09 09 20 | 20 47 45 54 5f 43 4f 44 |dy),... | GET_COD|
|00003360| 45 20 28 72 31 29 20 3d | 3d 20 52 45 47 20 7c 7c |E (r1) =|= REG |||
|00003370| 20 47 45 54 5f 43 4f 44 | 45 20 28 72 31 29 20 3d | GET_COD|E (r1) =|
|00003380| 3d 20 53 55 42 52 45 47 | 29 29 0d 09 20 20 20 20 |= SUBREG|)).. |
|00003390| 77 69 6e 20 3d 20 63 6f | 6d 62 69 6e 65 5f 72 65 |win = co|mbine_re|
|000033a0| 67 73 20 28 72 31 2c 20 | 72 30 2c 20 62 2c 20 69 |gs (r1, |r0, b, i|
|000033b0| 6e 73 6e 5f 6e 75 6d 62 | 65 72 2c 20 69 6e 73 6e |nsn_numb|er, insn|
|000033c0| 29 3b 0d 09 20 20 65 6c | 73 65 20 69 66 20 28 47 |);.. el|se if (G|
|000033d0| 45 54 5f 43 4f 44 45 20 | 28 62 6f 64 79 29 20 3d |ET_CODE |(body) =|
|000033e0| 3d 20 53 45 54 29 0d 09 | 20 20 20 20 7b 0d 09 20 |= SET)..| {.. |
|000033f0| 20 20 20 20 20 72 30 20 | 3d 20 53 45 54 5f 44 45 | r0 |= SET_DE|
|00003400| 53 54 20 28 62 6f 64 79 | 29 3b 0d 09 20 20 20 20 |ST (body|);.. |
|00003410| 20 20 69 66 20 28 47 45 | 54 5f 43 4f 44 45 20 28 | if (GE|T_CODE (|
|00003420| 72 30 29 20 3d 3d 20 52 | 45 47 20 7c 7c 20 47 45 |r0) == R|EG || GE|
|00003430| 54 5f 43 4f 44 45 20 28 | 72 30 29 20 3d 3d 20 53 |T_CODE (|r0) == S|
|00003440| 55 42 52 45 47 29 0d 09 | 09 7b 0d 09 09 20 20 69 |UBREG)..|.{... i|
|00003450| 66 20 28 47 45 54 5f 52 | 54 58 5f 46 4f 52 4d 41 |f (GET_R|TX_FORMA|
|00003460| 54 20 28 47 45 54 5f 43 | 4f 44 45 20 28 53 45 54 |T (GET_C|ODE (SET|
|00003470| 5f 53 52 43 20 28 62 6f | 64 79 29 29 29 5b 30 5d |_SRC (bo|dy)))[0]|
|00003480| 20 3d 3d 20 27 65 27 0d | 09 09 20 20 20 20 20 20 | == 'e'.|.. |
|00003490| 26 26 20 28 72 31 20 3d | 20 58 45 58 50 20 28 53 |&& (r1 =| XEXP (S|
|000034a0| 45 54 5f 53 52 43 20 28 | 62 6f 64 79 29 2c 20 30 |ET_SRC (|body), 0|
|000034b0| 29 2c 0d 09 09 09 20 20 | 47 45 54 5f 43 4f 44 45 |),.... |GET_CODE|
|000034c0| 20 28 72 31 29 20 3d 3d | 20 52 45 47 20 7c 7c 20 | (r1) ==| REG || |
|000034d0| 47 45 54 5f 43 4f 44 45 | 20 28 72 31 29 20 3d 3d |GET_CODE| (r1) ==|
|000034e0| 20 53 55 42 52 45 47 29 | 29 0d 09 09 20 20 20 20 | SUBREG)|)... |
|000034f0| 77 69 6e 20 3d 20 63 6f | 6d 62 69 6e 65 5f 72 65 |win = co|mbine_re|
|00003500| 67 73 20 28 72 31 2c 20 | 72 30 2c 20 62 2c 20 69 |gs (r1, |r0, b, i|
|00003510| 6e 73 6e 5f 6e 75 6d 62 | 65 72 2c 20 69 6e 73 6e |nsn_numb|er, insn|
|00003520| 29 3b 0d 09 09 20 20 69 | 66 20 28 77 69 6e 20 3d |);... i|f (win =|
|00003530| 3d 20 30 20 26 26 20 63 | 6f 6d 6d 75 74 61 74 69 |= 0 && c|ommutati|
|00003540| 76 65 0d 09 09 20 20 20 | 20 20 20 26 26 20 47 45 |ve... | && GE|
|00003550| 54 5f 52 54 58 5f 46 4f | 52 4d 41 54 20 28 47 45 |T_RTX_FO|RMAT (GE|
|00003560| 54 5f 43 4f 44 45 20 28 | 53 45 54 5f 53 52 43 20 |T_CODE (|SET_SRC |
|00003570| 28 62 6f 64 79 29 29 29 | 5b 31 5d 20 3d 3d 20 27 |(body)))|[1] == '|
|00003580| 65 27 0d 09 09 20 20 20 | 20 20 20 26 26 20 28 72 |e'... | && (r|
|00003590| 31 20 3d 20 58 45 58 50 | 20 28 53 45 54 5f 53 52 |1 = XEXP| (SET_SR|
|000035a0| 43 20 28 62 6f 64 79 29 | 2c 20 31 29 2c 0d 09 09 |C (body)|, 1),...|
|000035b0| 09 20 20 47 45 54 5f 43 | 4f 44 45 20 28 72 31 29 |. GET_C|ODE (r1)|
|000035c0| 20 3d 3d 20 52 45 47 20 | 7c 7c 20 47 45 54 5f 43 | == REG ||| GET_C|
|000035d0| 4f 44 45 20 28 72 31 29 | 20 3d 3d 20 53 55 42 52 |ODE (r1)| == SUBR|
|000035e0| 45 47 29 29 0d 09 09 20 | 20 20 20 77 69 6e 20 3d |EG))... | win =|
|000035f0| 20 63 6f 6d 62 69 6e 65 | 5f 72 65 67 73 20 28 72 | combine|_regs (r|
|00003600| 31 2c 20 72 30 2c 20 62 | 2c 20 69 6e 73 6e 5f 6e |1, r0, b|, insn_n|
|00003610| 75 6d 62 65 72 2c 20 69 | 6e 73 6e 29 3b 0d 09 09 |umber, i|nsn);...|
|00003620| 7d 0d 09 20 20 20 20 7d | 0d 09 20 20 65 6c 73 65 |}.. }|.. else|
|00003630| 20 69 66 20 28 47 45 54 | 5f 43 4f 44 45 20 28 62 | if (GET|_CODE (b|
|00003640| 6f 64 79 29 20 3d 3d 20 | 50 41 52 41 4c 4c 45 4c |ody) == |PARALLEL|
|00003650| 29 0d 09 20 20 20 20 7b | 0d 09 20 20 20 20 20 20 |).. {|.. |
|00003660| 72 74 78 20 73 65 74 31 | 20 3d 20 58 56 45 43 45 |rtx set1| = XVECE|
|00003670| 58 50 20 28 62 6f 64 79 | 2c 20 30 2c 20 30 29 3b |XP (body|, 0, 0);|
|00003680| 0d 09 20 20 20 20 20 20 | 69 66 20 28 47 45 54 5f |.. |if (GET_|
|00003690| 43 4f 44 45 20 28 73 65 | 74 31 29 20 3d 3d 20 53 |CODE (se|t1) == S|
|000036a0| 45 54 20 0d 09 09 20 20 | 26 26 20 28 72 30 20 3d |ET ... |&& (r0 =|
|000036b0| 20 53 45 54 5f 44 45 53 | 54 20 28 73 65 74 31 29 | SET_DES|T (set1)|
|000036c0| 2c 0d 09 09 20 20 20 20 | 20 20 47 45 54 5f 43 4f |,... | GET_CO|
|000036d0| 44 45 20 28 72 30 29 20 | 3d 3d 20 52 45 47 20 7c |DE (r0) |== REG ||
|000036e0| 7c 20 47 45 54 5f 43 4f | 44 45 20 28 72 30 29 20 || GET_CO|DE (r0) |
|000036f0| 3d 3d 20 53 55 42 52 45 | 47 29 0d 09 09 20 20 26 |== SUBRE|G)... &|
|00003700| 26 20 47 45 54 5f 52 54 | 58 5f 46 4f 52 4d 41 54 |& GET_RT|X_FORMAT|
|00003710| 20 28 47 45 54 5f 43 4f | 44 45 20 28 53 45 54 5f | (GET_CO|DE (SET_|
|00003720| 53 52 43 20 28 73 65 74 | 31 29 29 29 5b 30 5d 20 |SRC (set|1)))[0] |
|00003730| 3d 3d 20 27 65 27 0d 09 | 09 20 20 26 26 20 28 72 |== 'e'..|. && (r|
|00003740| 31 20 3d 20 58 45 58 50 | 20 28 53 45 54 5f 53 52 |1 = XEXP| (SET_SR|
|00003750| 43 20 28 73 65 74 31 29 | 2c 20 30 29 2c 0d 09 09 |C (set1)|, 0),...|
|00003760| 20 20 20 20 20 20 47 45 | 54 5f 43 4f 44 45 20 28 | GE|T_CODE (|
|00003770| 72 31 29 20 3d 3d 20 52 | 45 47 20 7c 7c 20 47 45 |r1) == R|EG || GE|
|00003780| 54 5f 43 4f 44 45 20 28 | 72 31 29 20 3d 3d 20 53 |T_CODE (|r1) == S|
|00003790| 55 42 52 45 47 29 29 0d | 09 09 77 69 6e 20 3d 20 |UBREG)).|..win = |
|000037a0| 63 6f 6d 62 69 6e 65 5f | 72 65 67 73 20 28 72 31 |combine_|regs (r1|
|000037b0| 2c 20 72 30 2c 20 62 2c | 20 69 6e 73 6e 5f 6e 75 |, r0, b,| insn_nu|
|000037c0| 6d 62 65 72 2c 20 69 6e | 73 6e 29 3b 0d 09 20 20 |mber, in|sn);.. |
|000037d0| 20 20 20 20 69 66 20 28 | 77 69 6e 20 3d 3d 20 30 | if (|win == 0|
|000037e0| 20 26 26 20 63 6f 6d 6d | 75 74 61 74 69 76 65 20 | && comm|utative |
|000037f0| 26 26 20 47 45 54 5f 43 | 4f 44 45 20 28 73 65 74 |&& GET_C|ODE (set|
|00003800| 31 29 20 3d 3d 20 53 45 | 54 20 0d 09 09 20 20 26 |1) == SE|T ... &|
|00003810| 26 20 28 72 30 20 3d 20 | 53 45 54 5f 44 45 53 54 |& (r0 = |SET_DEST|
|00003820| 20 28 73 65 74 31 29 2c | 0d 09 09 20 20 20 20 20 | (set1),|... |
|00003830| 20 47 45 54 5f 43 4f 44 | 45 20 28 72 30 29 20 3d | GET_COD|E (r0) =|
|00003840| 3d 20 52 45 47 20 7c 7c | 20 47 45 54 5f 43 4f 44 |= REG ||| GET_COD|
|00003850| 45 20 28 72 30 29 20 3d | 3d 20 53 55 42 52 45 47 |E (r0) =|= SUBREG|
|00003860| 29 0d 09 09 20 20 26 26 | 20 47 45 54 5f 52 54 58 |)... &&| GET_RTX|
|00003870| 5f 46 4f 52 4d 41 54 20 | 28 47 45 54 5f 43 4f 44 |_FORMAT |(GET_COD|
|00003880| 45 20 28 53 45 54 5f 53 | 52 43 20 28 73 65 74 31 |E (SET_S|RC (set1|
|00003890| 29 29 29 5b 31 5d 20 3d | 3d 20 27 65 27 0d 09 09 |)))[1] =|= 'e'...|
|000038a0| 20 20 26 26 20 28 72 31 | 20 3d 20 58 45 58 50 20 | && (r1| = XEXP |
|000038b0| 28 53 45 54 5f 53 52 43 | 20 28 73 65 74 31 29 2c |(SET_SRC| (set1),|
|000038c0| 20 31 29 2c 0d 09 09 20 | 20 20 20 20 20 47 45 54 | 1),... | GET|
|000038d0| 5f 43 4f 44 45 20 28 72 | 31 29 20 3d 3d 20 52 45 |_CODE (r|1) == RE|
|000038e0| 47 20 7c 7c 20 47 45 54 | 5f 43 4f 44 45 20 28 72 |G || GET|_CODE (r|
|000038f0| 31 29 20 3d 3d 20 53 55 | 42 52 45 47 29 29 0d 09 |1) == SU|BREG))..|
|00003900| 09 77 69 6e 20 3d 20 63 | 6f 6d 62 69 6e 65 5f 72 |.win = c|ombine_r|
|00003910| 65 67 73 20 28 72 31 2c | 20 72 30 2c 20 62 2c 20 |egs (r1,| r0, b, |
|00003920| 69 6e 73 6e 5f 6e 75 6d | 62 65 72 2c 20 69 6e 73 |insn_num|ber, ins|
|00003930| 6e 29 3b 0d 09 20 20 20 | 20 7d 0d 0d 09 20 20 2f |n);.. | }... /|
|00003940| 2a 20 49 66 20 72 65 67 | 69 73 74 65 72 73 20 77 |* If reg|isters w|
|00003950| 65 72 65 20 6a 75 73 74 | 20 74 69 65 64 2c 20 73 |ere just| tied, s|
|00003960| 65 74 20 43 4f 4d 42 49 | 4e 45 44 5f 52 45 47 4e |et COMBI|NED_REGN|
|00003970| 4f 0d 09 20 20 20 20 20 | 74 6f 20 74 68 65 20 6e |O.. |to the n|
|00003980| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 72 65 67 |umber of| the reg|
|00003990| 69 73 74 65 72 20 75 73 | 65 64 20 69 6e 20 74 68 |ister us|ed in th|
|000039a0| 69 73 20 69 6e 73 6e 0d | 09 20 20 20 20 20 74 68 |is insn.|. th|
|000039b0| 61 74 20 77 61 73 20 74 | 69 65 64 20 74 6f 20 74 |at was t|ied to t|
|000039c0| 68 65 20 72 65 67 69 73 | 74 65 72 20 73 65 74 20 |he regis|ter set |
|000039d0| 69 6e 20 74 68 69 73 20 | 69 6e 73 6e 2e 0d 09 20 |in this |insn... |
|000039e0| 20 20 20 20 54 68 69 73 | 20 72 65 67 69 73 74 65 | This| registe|
|000039f0| 72 27 73 20 71 74 79 20 | 73 68 6f 75 6c 64 20 6e |r's qty |should n|
|00003a00| 6f 74 20 62 65 20 22 6b | 69 6c 6c 65 64 22 2e 20 |ot be "k|illed". |
|00003a10| 20 2a 2f 0d 0d 09 20 20 | 69 66 20 28 77 69 6e 29 | */... |if (win)|
|00003a20| 0d 09 20 20 20 20 7b 0d | 09 20 20 20 20 20 20 77 |.. {.|. w|
|00003a30| 68 69 6c 65 20 28 47 45 | 54 5f 43 4f 44 45 20 28 |hile (GE|T_CODE (|
|00003a40| 72 31 29 20 3d 3d 20 53 | 55 42 52 45 47 29 0d 09 |r1) == S|UBREG)..|
|00003a50| 09 72 31 20 3d 20 53 55 | 42 52 45 47 5f 52 45 47 |.r1 = SU|BREG_REG|
|00003a60| 20 28 72 31 29 3b 0d 09 | 20 20 20 20 20 20 63 6f | (r1);..| co|
|00003a70| 6d 62 69 6e 65 64 5f 72 | 65 67 6e 6f 20 3d 20 52 |mbined_r|egno = R|
|00003a80| 45 47 4e 4f 20 28 72 31 | 29 3b 0d 09 20 20 20 20 |EGNO (r1|);.. |
|00003a90| 7d 0d 0d 09 20 20 66 6f | 72 20 28 6c 69 6e 6b 20 |}... fo|r (link |
|00003aa0| 3d 20 52 45 47 5f 4e 4f | 54 45 53 20 28 69 6e 73 |= REG_NO|TES (ins|
|00003ab0| 6e 29 3b 20 6c 69 6e 6b | 3b 20 6c 69 6e 6b 20 3d |n); link|; link =|
|00003ac0| 20 58 45 58 50 20 28 6c | 69 6e 6b 2c 20 31 29 29 | XEXP (l|ink, 1))|
|00003ad0| 0d 09 20 20 20 20 7b 0d | 09 20 20 20 20 20 20 2f |.. {.|. /|
|00003ae0| 2a 20 4d 61 72 6b 20 74 | 68 65 20 64 65 61 74 68 |* Mark t|he death|
|00003af0| 20 6f 66 20 65 76 65 72 | 79 74 68 69 6e 67 20 74 | of ever|ything t|
|00003b00| 68 61 74 20 64 69 65 73 | 20 69 6e 20 74 68 69 73 |hat dies| in this|
|00003b10| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 2c 0d 09 09 | instruc|tion,...|
|00003b20| 20 65 78 63 65 70 74 20 | 66 6f 72 20 61 6e 79 74 | except |for anyt|
|00003b30| 68 69 6e 67 20 74 68 61 | 74 20 77 61 73 20 6a 75 |hing tha|t was ju|
|00003b40| 73 74 20 63 6f 6d 62 69 | 6e 65 64 2e 20 20 2a 2f |st combi|ned. */|
|00003b50| 0d 09 20 20 20 20 20 20 | 69 66 20 28 58 45 58 50 |.. |if (XEXP|
|00003b60| 20 28 6c 69 6e 6b 2c 20 | 30 29 0d 09 09 20 20 26 | (link, |0)... &|
|00003b70| 26 20 52 45 47 5f 4e 4f | 54 45 5f 4b 49 4e 44 20 |& REG_NO|TE_KIND |
|00003b80| 28 6c 69 6e 6b 29 20 3d | 3d 20 52 45 47 5f 44 45 |(link) =|= REG_DE|
|00003b90| 41 44 0d 09 09 20 20 26 | 26 20 63 6f 6d 62 69 6e |AD... &|& combin|
|00003ba0| 65 64 5f 72 65 67 6e 6f | 20 21 3d 20 52 45 47 4e |ed_regno| != REGN|
|00003bb0| 4f 20 28 58 45 58 50 20 | 28 6c 69 6e 6b 2c 20 30 |O (XEXP |(link, 0|
|00003bc0| 29 29 29 0d 09 09 7b 0d | 23 69 66 20 30 20 20 2f |)))...{.|#if 0 /|
|00003bd0| 2a 20 54 68 65 20 6d 65 | 63 68 61 6e 69 73 6d 20 |* The me|chanism |
|00003be0| 69 6e 20 72 65 67 5f 69 | 73 5f 73 65 74 20 74 68 |in reg_i|s_set th|
|00003bf0| 61 74 20 63 68 65 63 6b | 73 20 77 68 65 74 68 65 |at check|s whethe|
|00003c00| 72 20 74 68 65 20 71 74 | 79 20 64 69 65 73 20 68 |r the qt|y dies h|
|00003c10| 65 72 65 0d 09 20 20 6f | 75 67 68 74 20 74 6f 20 |ere.. o|ught to |
|00003c20| 68 61 6e 64 6c 65 20 74 | 68 69 73 20 63 61 73 65 |handle t|his case|
|00003c30| 20 70 72 6f 70 65 72 6c | 79 2e 20 20 2a 2f 0d 09 | properl|y. */..|
|00003c40| 09 20 20 69 66 20 28 63 | 6f 6d 62 69 6e 65 64 5f |. if (c|ombined_|
|00003c50| 72 65 67 6e 6f 20 3e 3d | 20 30 20 26 26 0d 09 09 |regno >=| 0 &&...|
|00003c60| 20 20 20 20 20 20 72 65 | 67 5f 71 74 79 5b 63 6f | re|g_qty[co|
|00003c70| 6d 62 69 6e 65 64 5f 72 | 65 67 6e 6f 5d 20 3d 3d |mbined_r|egno] ==|
|00003c80| 20 72 65 67 5f 71 74 79 | 5b 52 45 47 4e 4f 20 28 | reg_qty|[REGNO (|
|00003c90| 58 45 58 50 20 28 6c 69 | 6e 6b 2c 20 30 29 29 5d |XEXP (li|nk, 0))]|
|00003ca0| 29 0d 09 09 20 20 20 20 | 2f 2a 20 48 65 72 65 20 |)... |/* Here |
|00003cb0| 66 6f 72 20 74 68 65 20 | 64 65 61 74 68 20 6f 66 |for the |death of|
|00003cc0| 20 74 68 65 20 71 75 6f | 74 69 65 6e 74 20 69 6e | the quo|tient in|
|00003cd0| 20 61 20 64 69 76 6d 6f | 64 20 69 6e 73 6e 3a 0d | a divmo|d insn:.|
|00003ce0| 09 09 20 20 20 20 20 20 | 20 73 6f 6d 65 74 68 69 |.. | somethi|
|00003cf0| 6e 67 20 74 68 61 74 20 | 77 61 73 20 62 6f 72 6e |ng that |was born|
|00003d00| 20 61 6e 64 20 64 65 61 | 64 20 69 6e 20 74 68 69 | and dea|d in thi|
|00003d10| 73 20 69 6e 73 6e 0d 09 | 09 20 20 20 20 20 20 20 |s insn..|. |
|00003d20| 62 75 74 20 63 6f 6d 62 | 69 6e 65 64 20 77 69 74 |but comb|ined wit|
|00003d30| 68 20 73 6f 6d 65 74 68 | 69 6e 67 20 65 6c 73 65 |h someth|ing else|
|00003d40| 20 74 68 61 74 20 61 6c | 73 6f 20 64 69 65 73 20 | that al|so dies |
|00003d50| 68 65 72 65 2e 0d 09 09 | 20 20 20 20 20 20 20 4d |here....| M|
|00003d60| 61 72 6b 20 74 68 65 20 | 71 74 79 20 61 73 20 64 |ark the |qty as d|
|00003d70| 79 69 6e 67 20 6f 6e 65 | 20 69 6e 73 74 72 75 63 |ying one| instruc|
|00003d80| 74 69 6f 6e 20 6c 61 74 | 65 72 2e 20 20 2a 2f 0d |tion lat|er. */.|
|00003d90| 09 09 20 20 20 20 77 69 | 70 65 5f 64 65 61 64 5f |.. wi|pe_dead_|
|00003da0| 72 65 67 20 28 58 45 58 | 50 20 28 6c 69 6e 6b 2c |reg (XEX|P (link,|
|00003db0| 20 30 29 2c 20 69 6e 73 | 6e 5f 6e 75 6d 62 65 72 | 0), ins|n_number|
|00003dc0| 2c 0d 09 09 09 09 20 20 | 20 69 6e 73 6e 5f 6e 75 |,..... | insn_nu|
|00003dd0| 6d 62 65 72 20 2b 20 31 | 29 3b 0d 09 09 20 20 65 |mber + 1|);... e|
|00003de0| 6c 73 65 0d 23 65 6e 64 | 69 66 0d 09 09 20 20 20 |lse.#end|if... |
|00003df0| 20 77 69 70 65 5f 64 65 | 61 64 5f 72 65 67 20 28 | wipe_de|ad_reg (|
|00003e00| 58 45 58 50 20 28 6c 69 | 6e 6b 2c 20 30 29 2c 20 |XEXP (li|nk, 0), |
|00003e10| 69 6e 73 6e 5f 6e 75 6d | 62 65 72 2c 20 69 6e 73 |insn_num|ber, ins|
|00003e20| 6e 5f 6e 75 6d 62 65 72 | 29 3b 0d 09 09 7d 0d 09 |n_number|);...}..|
|00003e30| 20 20 20 20 20 20 2f 2a | 20 41 6c 73 6f 2c 20 69 | /*| Also, i|
|00003e40| 66 20 74 68 69 73 20 69 | 6e 73 6e 20 69 6e 74 72 |f this i|nsn intr|
|00003e50| 6f 64 75 63 65 73 20 61 | 20 22 63 6f 6e 73 74 61 |oduces a| "consta|
|00003e60| 6e 74 22 20 72 65 67 69 | 73 74 65 72 2c 0d 09 09 |nt" regi|ster,...|
|00003e70| 20 74 68 61 74 20 63 6f | 75 6c 64 20 6a 75 73 74 | that co|uld just|
|00003e80| 20 62 65 20 72 65 70 6c | 61 63 65 64 20 62 79 20 | be repl|aced by |
|00003e90| 74 68 65 20 76 61 6c 75 | 65 20 69 74 20 69 73 20 |the valu|e it is |
|00003ea0| 67 69 76 65 6e 20 68 65 | 72 65 0d 09 09 20 28 77 |given he|re... (w|
|00003eb0| 68 69 63 68 20 63 61 6e | 20 6c 65 67 69 74 69 6d |hich can| legitim|
|00003ec0| 61 74 65 6c 79 20 62 65 | 20 61 6e 20 69 6d 6d 65 |ately be| an imme|
|00003ed0| 64 69 61 74 65 20 6f 70 | 65 72 61 6e 64 29 2c 0d |diate op|erand),.|
|00003ee0| 09 09 20 74 65 6c 6c 20 | 67 6c 6f 62 61 6c 2d 61 |.. tell |global-a|
|00003ef0| 6c 6c 6f 63 20 6e 6f 74 | 20 74 6f 20 61 6c 6c 6f |lloc not| to allo|
|00003f00| 63 61 74 65 20 69 74 0d | 09 09 20 75 6e 6c 65 73 |cate it.|.. unles|
|00003f10| 73 20 69 74 20 69 73 20 | 75 73 65 64 20 61 74 20 |s it is |used at |
|00003f20| 6c 65 61 73 74 20 74 77 | 69 63 65 20 6d 6f 72 65 |least tw|ice more|
|00003f30| 2e 20 20 2a 2f 0d 0d 09 | 20 20 20 20 20 20 65 6c |. */...| el|
|00003f40| 73 65 20 69 66 20 28 52 | 45 47 5f 4e 4f 54 45 5f |se if (R|EG_NOTE_|
|00003f50| 4b 49 4e 44 20 28 6c 69 | 6e 6b 29 20 3d 3d 20 52 |KIND (li|nk) == R|
|00003f60| 45 47 5f 45 51 55 49 56 | 0d 09 09 20 20 20 20 20 |EG_EQUIV|... |
|00003f70| 20 20 26 26 20 47 45 54 | 5f 43 4f 44 45 20 28 53 | && GET|_CODE (S|
|00003f80| 45 54 5f 44 45 53 54 20 | 28 62 6f 64 79 29 29 20 |ET_DEST |(body)) |
|00003f90| 3d 3d 20 52 45 47 0d 09 | 09 20 20 20 20 20 20 20 |== REG..|. |
|00003fa0| 26 26 20 67 65 6e 65 72 | 61 6c 5f 6f 70 65 72 61 |&& gener|al_opera|
|00003fb0| 6e 64 20 28 58 45 58 50 | 20 28 6c 69 6e 6b 2c 20 |nd (XEXP| (link, |
|00003fc0| 30 29 2c 20 56 4f 49 44 | 6d 6f 64 65 29 0d 09 09 |0), VOID|mode)...|
|00003fd0| 20 20 20 20 20 20 20 2f | 2a 20 44 6f 6e 27 74 20 | /|* Don't |
|00003fe0| 69 6e 68 69 62 69 74 20 | 61 6c 6c 6f 63 61 74 69 |inhibit |allocati|
|00003ff0| 6f 6e 20 6f 66 20 61 20 | 22 63 6f 6e 73 74 61 6e |on of a |"constan|
|00004000| 74 22 20 72 65 67 69 73 | 74 65 72 0d 09 09 09 20 |t" regis|ter.... |
|00004010| 20 74 68 61 74 20 77 65 | 20 68 61 76 65 20 61 6c | that we| have al|
|00004020| 72 65 61 64 79 20 74 69 | 65 64 20 74 6f 20 73 6f |ready ti|ed to so|
|00004030| 6d 65 74 68 69 6e 67 20 | 65 6c 73 65 21 20 20 2a |mething |else! *|
|00004040| 2f 0d 09 09 20 20 20 20 | 20 20 20 26 26 20 63 6f |/... | && co|
|00004050| 6d 62 69 6e 65 64 5f 72 | 65 67 6e 6f 20 3c 20 30 |mbined_r|egno < 0|
|00004060| 0d 09 09 20 20 20 20 20 | 20 20 2f 2a 20 44 6f 6e |... | /* Don|
|00004070| 27 74 20 6d 65 73 73 20 | 77 69 74 68 20 74 68 69 |'t mess |with thi|
|00004080| 6e 67 73 20 6c 69 76 65 | 20 64 75 72 69 6e 67 20 |ngs live| during |
|00004090| 73 65 74 6a 6d 70 2e 20 | 20 2a 2f 0d 09 09 20 20 |setjmp. | */... |
|000040a0| 20 20 20 20 20 26 26 20 | 72 65 67 5f 6c 69 76 65 | && |reg_live|
|000040b0| 5f 6c 65 6e 67 74 68 5b | 52 45 47 4e 4f 20 28 53 |_length[|REGNO (S|
|000040c0| 45 54 5f 44 45 53 54 20 | 28 62 6f 64 79 29 29 5d |ET_DEST |(body))]|
|000040d0| 20 3e 3d 20 30 29 0d 09 | 09 7b 0d 09 09 20 20 69 | >= 0)..|.{... i|
|000040e0| 20 3d 20 52 45 47 4e 4f | 20 28 53 45 54 5f 44 45 | = REGNO| (SET_DE|
|000040f0| 53 54 20 28 62 6f 64 79 | 29 29 3b 0d 09 09 20 20 |ST (body|));... |
|00004100| 69 66 20 28 72 65 67 5f | 6e 5f 73 65 74 73 5b 69 |if (reg_|n_sets[i|
|00004110| 5d 20 3e 20 31 29 0d 09 | 09 20 20 20 20 7b 0d 09 |] > 1)..|. {..|
|00004120| 09 20 20 20 20 20 20 2f | 2a 20 52 65 67 69 73 74 |. /|* Regist|
|00004130| 65 72 20 69 73 20 73 65 | 74 20 69 6e 20 61 6e 6f |er is se|t in ano|
|00004140| 74 68 65 72 20 70 6c 61 | 63 65 20 3d 3e 20 6e 6f |ther pla|ce => no|
|00004150| 74 20 72 65 61 6c 6c 79 | 20 63 6f 6e 73 74 61 6e |t really| constan|
|00004160| 74 2e 0d 09 09 09 20 63 | 73 65 20 6f 72 20 66 6c |t..... c|se or fl|
|00004170| 6f 77 20 63 61 6e 20 63 | 61 75 73 65 20 74 68 69 |ow can c|ause thi|
|00004180| 73 20 74 6f 20 68 61 70 | 70 65 6e 2e 0d 09 09 09 |s to hap|pen.....|
|00004190| 20 4f 6b 2c 20 66 6f 72 | 67 65 74 20 77 65 20 65 | Ok, for|get we e|
|000041a0| 76 65 72 20 74 68 6f 75 | 67 68 74 20 69 74 20 77 |ver thou|ght it w|
|000041b0| 61 73 20 63 6f 6e 73 74 | 61 6e 74 2e 20 20 2a 2f |as const|ant. */|
|000041c0| 0d 09 09 20 20 20 20 20 | 20 47 45 54 5f 4d 4f 44 |... | GET_MOD|
|000041d0| 45 20 28 6c 69 6e 6b 29 | 20 3d 20 56 4f 49 44 6d |E (link)| = VOIDm|
|000041e0| 6f 64 65 3b 0d 09 09 20 | 20 20 20 7d 0d 09 09 20 |ode;... | }... |
|000041f0| 20 65 6c 73 65 20 69 66 | 20 28 72 65 67 5f 6e 5f | else if| (reg_n_|
|00004200| 72 65 66 73 5b 69 5d 20 | 3c 3d 20 32 29 0d 09 09 |refs[i] |<= 2)...|
|00004210| 20 20 20 20 7b 0d 09 09 | 20 20 20 20 20 20 2f 2a | {...| /*|
|00004220| 20 46 6f 72 20 61 20 70 | 61 72 61 6d 65 74 65 72 | For a p|arameter|
|00004230| 20 63 6f 70 79 2c 20 64 | 6f 20 6c 65 74 20 67 6c | copy, d|o let gl|
|00004240| 6f 62 61 6c 2d 61 6c 6c | 6f 63 0d 09 09 09 20 61 |obal-all|oc.... a|
|00004250| 6c 6c 6f 63 61 74 65 20 | 69 74 3b 20 6f 74 68 65 |llocate |it; othe|
|00004260| 72 77 69 73 65 20 77 65 | 20 77 6f 75 6c 64 20 62 |rwise we| would b|
|00004270| 65 20 66 6f 72 63 65 64 | 20 74 6f 0d 09 09 09 20 |e forced| to.... |
|00004280| 68 61 76 65 20 61 20 66 | 72 61 6d 65 20 70 6f 69 |have a f|rame poi|
|00004290| 6e 74 65 72 2e 20 20 2a | 2f 0d 09 09 20 20 20 20 |nter. *|/... |
|000042a0| 20 20 69 66 20 28 21 20 | 66 72 61 6d 65 5f 70 6f | if (! |frame_po|
|000042b0| 69 6e 74 65 72 5f 6e 65 | 65 64 65 64 0d 09 09 09 |inter_ne|eded....|
|000042c0| 20 20 26 26 20 47 45 54 | 5f 43 4f 44 45 20 28 53 | && GET|_CODE (S|
|000042d0| 45 54 5f 53 52 43 20 28 | 50 41 54 54 45 52 4e 20 |ET_SRC (|PATTERN |
|000042e0| 28 69 6e 73 6e 29 29 29 | 20 3d 3d 20 4d 45 4d 29 |(insn)))| == MEM)|
|000042f0| 0d 09 09 09 72 65 67 5f | 6c 69 76 65 5f 6c 65 6e |....reg_|live_len|
|00004300| 67 74 68 5b 69 5d 20 3d | 20 2d 32 3b 0d 09 09 20 |gth[i] =| -2;... |
|00004310| 20 20 20 20 20 65 6c 73 | 65 0d 09 09 09 72 65 67 | els|e....reg|
|00004320| 5f 6c 69 76 65 5f 6c 65 | 6e 67 74 68 5b 69 5d 20 |_live_le|ngth[i] |
|00004330| 3d 20 2d 31 3b 0d 0d 09 | 09 20 20 20 20 20 20 2f |= -1;...|. /|
|00004340| 2a 20 49 66 20 76 61 6c | 75 65 20 69 73 20 6e 6f |* If val|ue is no|
|00004350| 74 20 63 6f 6e 73 74 61 | 6e 74 2c 20 77 65 20 68 |t consta|nt, we h|
|00004360| 61 76 65 20 61 20 70 61 | 72 61 6d 65 74 65 72 0d |ave a pa|rameter.|
|00004370| 09 09 09 20 6f 72 20 61 | 20 73 74 61 74 69 63 20 |... or a| static |
|00004380| 63 68 61 69 6e 20 70 6f | 69 6e 74 65 72 2e 20 20 |chain po|inter. |
|00004390| 54 65 6c 6c 20 6c 6f 63 | 61 6c 2d 61 6c 6c 6f 63 |Tell loc|al-alloc|
|000043a0| 0d 09 09 09 20 61 73 20 | 77 65 6c 6c 20 6e 6f 74 |.... as |well not|
|000043b0| 20 74 6f 20 61 6c 6c 6f | 63 61 74 65 20 69 74 2e | to allo|cate it.|
|000043c0| 20 20 2a 2f 0d 09 09 20 | 20 20 20 20 20 69 66 20 | */... | if |
|000043d0| 28 21 20 43 4f 4e 53 54 | 41 4e 54 5f 50 20 28 53 |(! CONST|ANT_P (S|
|000043e0| 45 54 5f 53 52 43 20 28 | 50 41 54 54 45 52 4e 20 |ET_SRC (|PATTERN |
|000043f0| 28 69 6e 73 6e 29 29 29 | 29 0d 09 09 09 7b 0d 09 |(insn)))|)....{..|
|00004400| 09 09 20 20 72 65 67 5f | 62 61 73 69 63 5f 62 6c |.. reg_|basic_bl|
|00004410| 6f 63 6b 5b 69 5d 20 3d | 20 52 45 47 5f 42 4c 4f |ock[i] =| REG_BLO|
|00004420| 43 4b 5f 47 4c 4f 42 41 | 4c 3b 0d 09 09 09 20 20 |CK_GLOBA|L;.... |
|00004430| 72 65 67 5f 71 74 79 5b | 69 5d 20 3d 20 2d 31 3b |reg_qty[|i] = -1;|
|00004440| 0d 09 09 09 7d 0d 09 09 | 20 20 20 20 7d 0d 09 09 |....}...| }...|
|00004450| 20 20 65 6c 73 65 0d 09 | 09 20 20 20 20 2f 2a 20 | else..|. /* |
|00004460| 49 6e 20 61 6e 79 20 63 | 61 73 65 2c 20 6c 6f 77 |In any c|ase, low|
|00004470| 65 72 20 69 74 73 20 70 | 72 69 6f 72 69 74 79 20 |er its p|riority |
|00004480| 66 6f 72 20 67 6c 6f 62 | 61 6c 2d 61 6c 6c 6f 63 |for glob|al-alloc|
|00004490| 2e 20 20 2a 2f 0d 09 09 | 20 20 20 20 72 65 67 5f |. */...| reg_|
|000044a0| 6c 69 76 65 5f 6c 65 6e | 67 74 68 5b 69 5d 20 2a |live_len|gth[i] *|
|000044b0| 3d 20 32 3b 0d 09 09 7d | 0d 09 20 20 20 20 7d 0d |= 2;...}|.. }.|
|000044c0| 0d 09 20 20 2f 2a 20 41 | 6c 6c 6f 63 61 74 65 20 |.. /* A|llocate |
|000044d0| 71 74 79 20 6e 75 6d 62 | 65 72 73 20 66 6f 72 20 |qty numb|ers for |
|000044e0| 61 6c 6c 20 72 65 67 69 | 73 74 65 72 73 20 6c 6f |all regi|sters lo|
|000044f0| 63 61 6c 20 74 6f 20 74 | 68 69 73 20 62 6c 6f 63 |cal to t|his bloc|
|00004500| 6b 0d 09 20 20 20 20 20 | 74 68 61 74 20 61 72 65 |k.. |that are|
|00004510| 20 62 6f 72 6e 20 28 73 | 65 74 29 20 69 6e 20 74 | born (s|et) in t|
|00004520| 68 69 73 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 2e |his inst|ruction.|
|00004530| 0d 09 20 20 20 20 20 41 | 20 70 73 65 75 64 6f 20 |.. A| pseudo |
|00004540| 74 68 61 74 20 61 6c 72 | 65 61 64 79 20 68 61 73 |that alr|eady has|
|00004550| 20 61 20 71 74 79 20 69 | 73 20 6e 6f 74 20 63 68 | a qty i|s not ch|
|00004560| 61 6e 67 65 64 2e 20 20 | 2a 2f 0d 0d 09 20 20 6e |anged. |*/... n|
|00004570| 6f 74 65 5f 73 74 6f 72 | 65 73 20 28 50 41 54 54 |ote_stor|es (PATT|
|00004580| 45 52 4e 20 28 69 6e 73 | 6e 29 2c 20 72 65 67 5f |ERN (ins|n), reg_|
|00004590| 69 73 5f 73 65 74 29 3b | 0d 09 7d 0d 20 20 20 20 |is_set);|..}. |
|000045a0| 20 20 69 66 20 28 47 45 | 54 5f 43 4f 44 45 20 28 | if (GE|T_CODE (|
|000045b0| 69 6e 73 6e 29 20 3d 3d | 20 43 41 4c 4c 5f 49 4e |insn) ==| CALL_IN|
|000045c0| 53 4e 29 0d 09 63 61 6c | 6c 5f 73 65 65 6e 20 3d |SN)..cal|l_seen =|
|000045d0| 20 31 3b 0d 20 20 20 20 | 20 20 69 66 20 28 69 6e | 1;. | if (in|
|000045e0| 73 6e 20 3d 3d 20 62 61 | 73 69 63 5f 62 6c 6f 63 |sn == ba|sic_bloc|
|000045f0| 6b 5f 65 6e 64 5b 62 5d | 29 0d 09 62 72 65 61 6b |k_end[b]|)..break|
|00004600| 3b 0d 20 20 20 20 20 20 | 2f 2a 20 57 65 20 64 6f |;. |/* We do|
|00004610| 6e 27 74 20 6e 65 65 64 | 20 74 68 69 73 20 66 6f |n't need| this fo|
|00004620| 72 20 74 68 65 20 62 6c | 6f 63 6b 27 73 20 66 69 |r the bl|ock's fi|
|00004630| 72 73 74 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 0d |rst inst|ruction.|
|00004640| 09 20 73 69 6e 63 65 20 | 6e 6f 20 72 65 67 73 20 |. since |no regs |
|00004650| 77 65 20 63 61 72 65 20 | 61 62 6f 75 74 20 61 72 |we care |about ar|
|00004660| 65 20 6c 69 76 65 20 62 | 65 66 6f 72 65 20 74 68 |e live b|efore th|
|00004670| 61 74 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 2e 0d |at instr|uction..|
|00004680| 09 20 41 6c 73 6f 20 77 | 65 20 64 6f 20 6e 6f 74 |. Also w|e do not|
|00004690| 20 61 6c 6c 6f 63 61 74 | 65 20 73 70 61 63 65 20 | allocat|e space |
|000046a0| 69 6e 20 72 65 67 73 5f | 6c 69 76 65 5f 61 74 20 |in regs_|live_at |
|000046b0| 66 6f 72 20 74 68 61 74 | 20 69 6e 73 74 72 75 63 |for that| instruc|
|000046c0| 74 69 6f 6e 2e 20 2a 2f | 0d 20 20 20 20 20 20 49 |tion. */|. I|
|000046d0| 4f 52 5f 48 41 52 44 5f | 52 45 47 5f 53 45 54 20 |OR_HARD_|REG_SET |
|000046e0| 28 72 65 67 73 5f 6c 69 | 76 65 5f 61 74 5b 69 6e |(regs_li|ve_at[in|
|000046f0| 73 6e 5f 6e 75 6d 62 65 | 72 5d 2c 20 72 65 67 73 |sn_numbe|r], regs|
|00004700| 5f 6c 69 76 65 29 3b 0d | 20 20 20 20 20 20 69 6e |_live);.| in|
|00004710| 73 6e 20 3d 20 4e 45 58 | 54 5f 49 4e 53 4e 20 28 |sn = NEX|T_INSN (|
|00004720| 69 6e 73 6e 29 3b 0d 20 | 20 20 20 7d 0d 0d 20 20 |insn);. | }.. |
|00004730| 2f 2a 20 4e 6f 77 20 65 | 76 65 72 79 20 72 65 67 |/* Now e|very reg|
|00004740| 69 73 74 65 72 20 74 68 | 61 74 20 69 73 20 6c 6f |ister th|at is lo|
|00004750| 63 61 6c 20 74 6f 20 74 | 68 69 73 20 62 61 73 69 |cal to t|his basi|
|00004760| 63 20 62 6c 6f 63 6b 0d | 20 20 20 20 20 73 68 6f |c block.| sho|
|00004770| 75 6c 64 20 68 61 76 65 | 20 62 65 65 6e 20 67 69 |uld have| been gi|
|00004780| 76 65 6e 20 61 20 71 75 | 61 6e 74 69 74 79 2c 20 |ven a qu|antity, |
|00004790| 6f 72 20 65 6c 73 65 20 | 2d 31 20 6d 65 61 6e 69 |or else |-1 meani|
|000047a0| 6e 67 20 69 67 6e 6f 72 | 65 20 69 74 2e 0d 20 20 |ng ignor|e it.. |
|000047b0| 20 20 20 45 76 65 72 79 | 20 71 75 61 6e 74 69 74 | Every| quantit|
|000047c0| 79 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 61 20 |y should| have a |
|000047d0| 6b 6e 6f 77 6e 20 62 69 | 72 74 68 20 28 76 65 72 |known bi|rth (ver|
|000047e0| 69 66 79 20 74 68 69 73 | 20 6e 6f 77 29 2e 0d 0d |ify this| now)...|
|000047f0| 20 20 20 20 20 49 66 20 | 61 20 71 74 79 27 73 20 | If |a qty's |
|00004800| 64 65 61 74 68 20 68 61 | 73 20 6e 6f 74 20 62 65 |death ha|s not be|
|00004810| 65 6e 20 65 73 74 61 62 | 6c 69 73 68 65 64 2c 20 |en estab|lished, |
|00004820| 69 74 20 69 6e 64 69 63 | 61 74 65 73 20 61 20 64 |it indic|ates a d|
|00004830| 65 61 64 20 73 74 6f 72 | 65 2e 0d 20 20 20 20 20 |ead stor|e.. |
|00004840| 54 68 61 74 20 69 73 20 | 6f 6b 20 69 66 20 74 68 |That is |ok if th|
|00004850| 65 20 69 6e 73 6e 20 69 | 73 20 6e 6f 74 20 65 6e |e insn i|s not en|
|00004860| 74 69 72 65 6c 79 20 64 | 65 61 64 2e 0d 20 20 20 |tirely d|ead.. |
|00004870| 20 20 53 6f 20 73 65 74 | 20 74 68 65 20 71 74 79 | So set| the qty|
|00004880| 27 64 20 64 65 61 74 68 | 20 74 6f 20 6a 75 73 74 |'d death| to just|
|00004890| 20 61 66 74 65 72 20 69 | 74 73 20 62 69 72 74 68 | after i|ts birth|
|000048a0| 2e 20 20 2a 2f 0d 0d 20 | 20 66 6f 72 20 28 69 20 |. */.. | for (i |
|000048b0| 3d 20 46 49 52 53 54 5f | 50 53 45 55 44 4f 5f 52 |= FIRST_|PSEUDO_R|
|000048c0| 45 47 49 53 54 45 52 3b | 20 69 20 3c 20 6e 65 78 |EGISTER;| i < nex|
|000048d0| 74 5f 71 74 79 3b 20 69 | 2b 2b 29 0d 20 20 20 20 |t_qty; i|++). |
|000048e0| 7b 0d 20 20 20 20 20 20 | 69 66 20 28 71 74 79 5f |{. |if (qty_|
|000048f0| 62 69 72 74 68 5b 69 5d | 20 3d 3d 20 2d 31 29 0d |birth[i]| == -1).|
|00004900| 09 61 62 6f 72 74 20 28 | 29 3b 0d 20 20 20 20 20 |.abort (|);. |
|00004910| 20 69 66 20 28 71 74 79 | 5f 64 65 61 74 68 5b 69 | if (qty|_death[i|
|00004920| 5d 20 3d 3d 20 2d 31 29 | 0d 09 71 74 79 5f 64 65 |] == -1)|..qty_de|
|00004930| 61 74 68 5b 69 5d 20 3d | 20 71 74 79 5f 62 69 72 |ath[i] =| qty_bir|
|00004940| 74 68 5b 69 5d 20 2b 20 | 31 3b 0d 20 20 20 20 7d |th[i] + |1;. }|
|00004950| 0d 0d 20 20 2f 2a 20 4e | 6f 77 20 6f 72 64 65 72 |.. /* N|ow order|
|00004960| 20 74 68 65 20 71 74 79 | 73 20 73 6f 20 77 65 20 | the qty|s so we |
|00004970| 61 73 73 69 67 6e 20 74 | 68 65 6d 20 72 65 67 69 |assign t|hem regi|
|00004980| 73 74 65 72 73 0d 20 20 | 20 20 20 69 6e 20 6f 72 |sters. | in or|
|00004990| 64 65 72 20 6f 66 20 64 | 65 63 72 65 61 73 69 6e |der of d|ecreasin|
|000049a0| 67 20 6c 65 6e 67 74 68 | 20 6f 66 20 6c 69 66 65 |g length| of life|
|000049b0| 2e 20 20 2a 2f 0d 20 20 | 71 74 79 5f 6f 72 64 65 |. */. |qty_orde|
|000049c0| 72 20 3d 20 28 73 68 6f | 72 74 20 2a 29 20 61 6c |r = (sho|rt *) al|
|000049d0| 6c 6f 63 61 20 28 6e 65 | 78 74 5f 71 74 79 20 2a |loca (ne|xt_qty *|
|000049e0| 20 73 69 7a 65 6f 66 20 | 28 73 68 6f 72 74 29 29 | sizeof |(short))|
|000049f0| 3b 0d 20 20 66 6f 72 20 | 28 69 20 3d 20 46 49 52 |;. for |(i = FIR|
|00004a00| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|00004a10| 45 52 3b 20 69 20 3c 20 | 6e 65 78 74 5f 71 74 79 |ER; i < |next_qty|
|00004a20| 3b 20 69 2b 2b 29 0d 20 | 20 20 20 71 74 79 5f 6f |; i++). | qty_o|
|00004a30| 72 64 65 72 5b 69 5d 20 | 3d 20 69 3b 0d 0d 23 64 |rder[i] |= i;..#d|
|00004a40| 65 66 69 6e 65 20 45 58 | 43 48 41 4e 47 45 28 49 |efine EX|CHANGE(I|
|00004a50| 31 2c 20 49 32 29 20 20 | 5c 0d 20 20 7b 20 69 20 |1, I2) |\. { i |
|00004a60| 3d 20 71 74 79 5f 6f 72 | 64 65 72 5b 49 31 5d 3b |= qty_or|der[I1];|
|00004a70| 20 71 74 79 5f 6f 72 64 | 65 72 5b 49 31 5d 20 3d | qty_ord|er[I1] =|
|00004a80| 20 71 74 79 5f 6f 72 64 | 65 72 5b 49 32 5d 3b 20 | qty_ord|er[I2]; |
|00004a90| 71 74 79 5f 6f 72 64 65 | 72 5b 49 32 5d 20 3d 20 |qty_orde|r[I2] = |
|00004aa0| 69 3b 20 7d 0d 0d 20 20 | 69 66 20 28 6e 65 78 74 |i; }.. |if (next|
|00004ab0| 5f 71 74 79 20 3d 3d 20 | 32 20 2b 20 46 49 52 53 |_qty == |2 + FIRS|
|00004ac0| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00004ad0| 52 29 0d 20 20 20 20 7b | 0d 20 20 20 20 20 20 69 |R). {|. i|
|00004ae0| 66 20 28 71 74 79 5f 63 | 6f 6d 70 61 72 65 20 28 |f (qty_c|ompare (|
|00004af0| 46 49 52 53 54 5f 50 53 | 45 55 44 4f 5f 52 45 47 |FIRST_PS|EUDO_REG|
|00004b00| 49 53 54 45 52 2c 20 46 | 49 52 53 54 5f 50 53 45 |ISTER, F|IRST_PSE|
|00004b10| 55 44 4f 5f 52 45 47 49 | 53 54 45 52 20 2b 20 31 |UDO_REGI|STER + 1|
|00004b20| 29 20 3e 20 30 29 0d 09 | 45 58 43 48 41 4e 47 45 |) > 0)..|EXCHANGE|
|00004b30| 20 28 46 49 52 53 54 5f | 50 53 45 55 44 4f 5f 52 | (FIRST_|PSEUDO_R|
|00004b40| 45 47 49 53 54 45 52 2c | 20 46 49 52 53 54 5f 50 |EGISTER,| FIRST_P|
|00004b50| 53 45 55 44 4f 5f 52 45 | 47 49 53 54 45 52 20 2b |SEUDO_RE|GISTER +|
|00004b60| 20 31 29 3b 0d 20 20 20 | 20 7d 0d 20 20 65 6c 73 | 1);. | }. els|
|00004b70| 65 20 69 66 20 28 6e 65 | 78 74 5f 71 74 79 20 3d |e if (ne|xt_qty =|
|00004b80| 3d 20 33 20 2b 20 46 49 | 52 53 54 5f 50 53 45 55 |= 3 + FI|RST_PSEU|
|00004b90| 44 4f 5f 52 45 47 49 53 | 54 45 52 29 0d 20 20 20 |DO_REGIS|TER). |
|00004ba0| 20 7b 0d 20 20 20 20 20 | 20 69 66 20 28 71 74 79 | {. | if (qty|
|00004bb0| 5f 63 6f 6d 70 61 72 65 | 20 28 46 49 52 53 54 5f |_compare| (FIRST_|
|00004bc0| 50 53 45 55 44 4f 5f 52 | 45 47 49 53 54 45 52 2c |PSEUDO_R|EGISTER,|
|00004bd0| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|00004be0| 47 49 53 54 45 52 20 2b | 20 31 29 20 3e 20 30 29 |GISTER +| 1) > 0)|
|00004bf0| 0d 09 45 58 43 48 41 4e | 47 45 20 28 46 49 52 53 |..EXCHAN|GE (FIRS|
|00004c00| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00004c10| 52 2c 20 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f |R, FIRST|_PSEUDO_|
|00004c20| 52 45 47 49 53 54 45 52 | 20 2b 20 31 29 3b 0d 20 |REGISTER| + 1);. |
|00004c30| 20 20 20 20 20 69 66 20 | 28 71 74 79 5f 63 6f 6d | if |(qty_com|
|00004c40| 70 61 72 65 20 28 46 49 | 52 53 54 5f 50 53 45 55 |pare (FI|RST_PSEU|
|00004c50| 44 4f 5f 52 45 47 49 53 | 54 45 52 20 2b 20 31 2c |DO_REGIS|TER + 1,|
|00004c60| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|00004c70| 47 49 53 54 45 52 20 2b | 20 32 29 20 3e 20 30 29 |GISTER +| 2) > 0)|
|00004c80| 0d 09 45 58 43 48 41 4e | 47 45 20 28 46 49 52 53 |..EXCHAN|GE (FIRS|
|00004c90| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00004ca0| 52 20 2b 20 32 2c 20 46 | 49 52 53 54 5f 50 53 45 |R + 2, F|IRST_PSE|
|00004cb0| 55 44 4f 5f 52 45 47 49 | 53 54 45 52 20 2b 20 31 |UDO_REGI|STER + 1|
|00004cc0| 29 3b 0d 20 20 20 20 20 | 20 69 66 20 28 71 74 79 |);. | if (qty|
|00004cd0| 5f 63 6f 6d 70 61 72 65 | 20 28 46 49 52 53 54 5f |_compare| (FIRST_|
|00004ce0| 50 53 45 55 44 4f 5f 52 | 45 47 49 53 54 45 52 2c |PSEUDO_R|EGISTER,|
|00004cf0| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|00004d00| 47 49 53 54 45 52 20 2b | 20 31 29 20 3e 20 30 29 |GISTER +| 1) > 0)|
|00004d10| 0d 09 45 58 43 48 41 4e | 47 45 20 28 46 49 52 53 |..EXCHAN|GE (FIRS|
|00004d20| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00004d30| 52 2c 20 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f |R, FIRST|_PSEUDO_|
|00004d40| 52 45 47 49 53 54 45 52 | 20 2b 20 31 29 3b 0d 20 |REGISTER| + 1);. |
|00004d50| 20 20 20 7d 0d 20 20 65 | 6c 73 65 20 69 66 20 28 | }. e|lse if (|
|00004d60| 6e 65 78 74 5f 71 74 79 | 20 3e 20 33 20 2b 20 46 |next_qty| > 3 + F|
|00004d70| 49 52 53 54 5f 50 53 45 | 55 44 4f 5f 52 45 47 49 |IRST_PSE|UDO_REGI|
|00004d80| 53 54 45 52 29 0d 20 20 | 20 20 71 73 6f 72 74 20 |STER). | qsort |
|00004d90| 28 71 74 79 5f 6f 72 64 | 65 72 20 2b 20 46 49 52 |(qty_ord|er + FIR|
|00004da0| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|00004db0| 45 52 2c 0d 09 20 20 20 | 6e 65 78 74 5f 71 74 79 |ER,.. |next_qty|
|00004dc0| 20 2d 20 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f | - FIRST|_PSEUDO_|
|00004dd0| 52 45 47 49 53 54 45 52 | 2c 20 73 69 7a 65 6f 66 |REGISTER|, sizeof|
|00004de0| 20 28 73 68 6f 72 74 29 | 2c 20 71 74 79 5f 63 6f | (short)|, qty_co|
|00004df0| 6d 70 61 72 65 5f 31 29 | 3b 0d 0d 20 20 2f 2a 20 |mpare_1)|;.. /* |
|00004e00| 4e 6f 77 20 66 6f 72 20 | 65 61 63 68 20 71 74 79 |Now for |each qty|
|00004e10| 20 74 68 61 74 20 69 73 | 20 6e 6f 74 20 61 20 68 | that is| not a h|
|00004e20| 61 72 64 77 61 72 65 20 | 72 65 67 69 73 74 65 72 |ardware |register|
|00004e30| 2c 0d 20 20 20 20 20 6c | 6f 6f 6b 20 66 6f 72 20 |,. l|ook for |
|00004e40| 61 20 68 61 72 64 77 61 | 72 65 20 72 65 67 69 73 |a hardwa|re regis|
|00004e50| 74 65 72 20 74 6f 20 70 | 75 74 20 69 74 20 69 6e |ter to p|ut it in|
|00004e60| 2e 0d 20 20 20 20 20 46 | 69 72 73 74 20 74 72 79 |.. F|irst try|
|00004e70| 20 74 68 65 20 72 65 67 | 69 73 74 65 72 20 63 6c | the reg|ister cl|
|00004e80| 61 73 73 20 74 68 61 74 | 20 69 73 20 63 68 65 61 |ass that| is chea|
|00004e90| 70 65 73 74 20 66 6f 72 | 20 74 68 69 73 20 71 74 |pest for| this qt|
|00004ea0| 79 2c 0d 20 20 20 20 20 | 69 66 20 74 68 65 72 65 |y,. |if there|
|00004eb0| 20 69 73 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e | is more| than on|
|00004ec0| 65 20 63 6c 61 73 73 2e | 20 20 2a 2f 0d 0d 20 20 |e class.| */.. |
|00004ed0| 66 6f 72 20 28 69 20 3d | 20 46 49 52 53 54 5f 50 |for (i =| FIRST_P|
|00004ee0| 53 45 55 44 4f 5f 52 45 | 47 49 53 54 45 52 3b 20 |SEUDO_RE|GISTER; |
|00004ef0| 69 20 3c 20 6e 65 78 74 | 5f 71 74 79 3b 20 69 2b |i < next|_qty; i+|
|00004f00| 2b 29 0d 20 20 20 20 7b | 0d 0d 23 69 66 64 65 66 |+). {|..#ifdef|
|00004f10| 20 4d 50 57 0d 20 20 20 | 20 20 53 70 69 6e 43 75 | MPW. | SpinCu|
|00004f20| 72 73 6f 72 28 31 29 3b | 0d 23 65 6e 64 69 66 0d |rsor(1);|.#endif.|
|00004f30| 0d 20 20 20 20 20 20 71 | 20 3d 20 71 74 79 5f 6f |. q| = qty_o|
|00004f40| 72 64 65 72 5b 69 5d 3b | 0d 20 20 20 20 20 20 69 |rder[i];|. i|
|00004f50| 66 20 28 71 74 79 5f 73 | 69 7a 65 5b 71 5d 20 3e |f (qty_s|ize[q] >|
|00004f60| 3d 20 30 29 0d 09 7b 0d | 09 20 20 69 66 20 28 4e |= 0)..{.|. if (N|
|00004f70| 5f 52 45 47 5f 43 4c 41 | 53 53 45 53 20 3e 20 31 |_REG_CLA|SSES > 1|
|00004f80| 29 0d 09 20 20 20 20 7b | 0d 09 20 20 20 20 20 20 |).. {|.. |
|00004f90| 71 74 79 5f 70 68 79 73 | 5f 72 65 67 5b 71 5d 20 |qty_phys|_reg[q] |
|00004fa0| 3d 20 66 69 6e 64 5f 66 | 72 65 65 5f 72 65 67 20 |= find_f|ree_reg |
|00004fb0| 28 71 74 79 5f 6d 69 6e | 5f 63 6c 61 73 73 5b 71 |(qty_min|_class[q|
|00004fc0| 5d 2c 20 0d 09 09 09 09 | 09 20 20 20 20 20 20 20 |], .....|. |
|00004fd0| 71 74 79 5f 6d 6f 64 65 | 5b 71 5d 2c 20 71 2c 20 |qty_mode|[q], q, |
|00004fe0| 30 2c 0d 09 09 09 09 09 | 20 20 20 20 20 20 20 71 |0,......| q|
|00004ff0| 74 79 5f 62 69 72 74 68 | 5b 71 5d 2c 20 71 74 79 |ty_birth|[q], qty|
|00005000| 5f 64 65 61 74 68 5b 71 | 5d 29 3b 0d 09 20 20 20 |_death[q|]);.. |
|00005010| 20 20 20 69 66 20 28 71 | 74 79 5f 70 68 79 73 5f | if (q|ty_phys_|
|00005020| 72 65 67 5b 71 5d 20 3e | 3d 20 30 29 0d 09 09 63 |reg[q] >|= 0)...c|
|00005030| 6f 6e 74 69 6e 75 65 3b | 0d 09 20 20 20 20 7d 0d |ontinue;|.. }.|
|00005040| 0d 09 20 20 69 66 20 28 | 21 71 74 79 5f 70 72 65 |.. if (|!qty_pre|
|00005050| 66 65 72 72 65 64 5f 6f | 72 5f 6e 6f 74 68 69 6e |ferred_o|r_nothin|
|00005060| 67 5b 71 5d 29 0d 09 20 | 20 20 20 71 74 79 5f 70 |g[q]).. | qty_p|
|00005070| 68 79 73 5f 72 65 67 5b | 71 5d 20 3d 20 66 69 6e |hys_reg[|q] = fin|
|00005080| 64 5f 66 72 65 65 5f 72 | 65 67 20 28 47 45 4e 45 |d_free_r|eg (GENE|
|00005090| 52 41 4c 5f 52 45 47 53 | 2c 20 0d 09 09 09 09 09 |RAL_REGS|, ......|
|000050a0| 20 20 20 20 20 71 74 79 | 5f 6d 6f 64 65 5b 71 5d | qty|_mode[q]|
|000050b0| 2c 20 71 2c 20 30 2c 0d | 09 09 09 09 09 20 20 20 |, q, 0,.|..... |
|000050c0| 20 20 71 74 79 5f 62 69 | 72 74 68 5b 71 5d 2c 20 | qty_bi|rth[q], |
|000050d0| 71 74 79 5f 64 65 61 74 | 68 5b 71 5d 29 3b 0d 09 |qty_deat|h[q]);..|
|000050e0| 7d 0d 20 20 20 20 7d 0d | 0d 20 20 2f 2a 20 4e 6f |}. }.|. /* No|
|000050f0| 77 20 70 72 6f 70 61 67 | 61 74 65 20 74 68 65 20 |w propag|ate the |
|00005100| 72 65 67 69 73 74 65 72 | 20 61 73 73 69 67 6e 6d |register| assignm|
|00005110| 65 6e 74 73 0d 20 20 20 | 20 20 74 6f 20 74 68 65 |ents. | to the|
|00005120| 20 70 73 65 75 64 6f 20 | 72 65 67 73 20 62 65 6c | pseudo |regs bel|
|00005130| 6f 6e 67 69 6e 67 20 74 | 6f 20 74 68 65 20 71 74 |onging t|o the qt|
|00005140| 79 73 2e 20 20 2a 2f 0d | 0d 20 20 66 6f 72 20 28 |ys. */.|. for (|
|00005150| 69 20 3d 20 46 49 52 53 | 54 5f 50 53 45 55 44 4f |i = FIRS|T_PSEUDO|
|00005160| 5f 52 45 47 49 53 54 45 | 52 3b 20 69 20 3c 20 6d |_REGISTE|R; i < m|
|00005170| 61 78 5f 72 65 67 6e 6f | 3b 20 69 2b 2b 29 0d 20 |ax_regno|; i++). |
|00005180| 20 20 20 69 66 20 28 72 | 65 67 5f 71 74 79 5b 69 | if (r|eg_qty[i|
|00005190| 5d 20 3e 3d 20 30 20 26 | 26 20 71 74 79 5f 70 68 |] >= 0 &|& qty_ph|
|000051a0| 79 73 5f 72 65 67 5b 72 | 65 67 5f 71 74 79 5b 69 |ys_reg[r|eg_qty[i|
|000051b0| 5d 5d 20 3e 3d 20 30 29 | 0d 20 20 20 20 20 20 7b |]] >= 0)|. {|
|000051c0| 0d 09 72 65 67 5f 72 65 | 6e 75 6d 62 65 72 5b 69 |..reg_re|number[i|
|000051d0| 5d 20 3d 20 71 74 79 5f | 70 68 79 73 5f 72 65 67 |] = qty_|phys_reg|
|000051e0| 5b 72 65 67 5f 71 74 79 | 5b 69 5d 5d 20 2b 20 72 |[reg_qty|[i]] + r|
|000051f0| 65 67 5f 6f 66 66 73 65 | 74 5b 69 5d 3b 0d 20 20 |eg_offse|t[i];. |
|00005200| 20 20 20 20 7d 0d 7d 0d | 0c 0d 2f 2a 20 43 6f 6d | }.}.|../* Com|
|00005210| 70 61 72 65 20 74 77 6f | 20 71 75 61 6e 74 69 74 |pare two| quantit|
|00005220| 69 65 73 27 20 70 72 69 | 6f 72 69 74 79 20 66 6f |ies' pri|ority fo|
|00005230| 72 20 67 65 74 74 69 6e | 67 20 72 65 61 6c 20 72 |r gettin|g real r|
|00005240| 65 67 69 73 74 65 72 73 | 2e 0d 20 20 20 57 65 20 |egisters|.. We |
|00005250| 67 69 76 65 20 71 75 61 | 6e 74 69 74 69 65 73 20 |give qua|ntities |
|00005260| 77 69 74 68 20 68 61 72 | 64 2d 72 65 67 20 73 75 |with har|d-reg su|
|00005270| 67 67 65 73 74 69 6f 6e | 73 20 70 72 69 6f 72 69 |ggestion|s priori|
|00005280| 74 79 20 6f 76 65 72 20 | 61 6c 6c 20 6f 74 68 65 |ty over |all othe|
|00005290| 72 73 2e 0d 20 20 20 57 | 65 20 67 69 76 65 20 6c |rs.. W|e give l|
|000052a0| 6f 6e 67 65 72 2d 6c 69 | 76 65 64 20 71 75 61 6e |onger-li|ved quan|
|000052b0| 74 69 74 69 65 73 20 68 | 69 67 68 65 72 20 70 72 |tities h|igher pr|
|000052c0| 69 6f 72 69 74 79 0d 20 | 20 20 73 6f 20 74 68 61 |iority. | so tha|
|000052d0| 74 20 74 68 65 20 73 68 | 6f 72 74 65 72 2d 6c 69 |t the sh|orter-li|
|000052e0| 76 65 64 20 6f 6e 65 73 | 20 77 69 6c 6c 20 74 65 |ved ones| will te|
|000052f0| 6e 64 20 74 6f 20 62 65 | 20 69 6e 20 74 68 65 20 |nd to be| in the |
|00005300| 73 61 6d 65 20 70 6c 61 | 63 65 73 0d 20 20 20 77 |same pla|ces. w|
|00005310| 68 69 63 68 20 67 69 76 | 65 73 20 69 6e 20 67 65 |hich giv|es in ge|
|00005320| 6e 65 72 61 6c 20 74 68 | 65 20 6d 61 78 69 6d 75 |neral th|e maximu|
|00005330| 6d 20 72 6f 6f 6d 20 66 | 6f 72 20 74 68 65 20 72 |m room f|or the r|
|00005340| 65 67 73 20 74 6f 0d 20 | 20 20 62 65 20 61 6c 6c |egs to. | be all|
|00005350| 6f 63 61 74 65 64 20 62 | 79 20 67 6c 6f 62 61 6c |ocated b|y global|
|00005360| 2d 61 6c 6c 6f 63 2e 0d | 20 20 20 52 65 67 73 20 |-alloc..| Regs |
|00005370| 77 69 74 68 20 6d 6f 72 | 65 20 72 65 66 65 72 65 |with mor|e refere|
|00005380| 6e 63 65 73 20 61 72 65 | 20 61 6c 73 6f 20 70 72 |nces are| also pr|
|00005390| 65 66 65 72 72 65 64 2e | 20 20 2a 2f 0d 0d 73 74 |eferred.| */..st|
|000053a0| 61 74 69 63 20 69 6e 74 | 0d 71 74 79 5f 63 6f 6d |atic int|.qty_com|
|000053b0| 70 61 72 65 20 28 71 31 | 2c 20 71 32 29 0d 20 20 |pare (q1|, q2). |
|000053c0| 20 20 20 69 6e 74 20 71 | 31 2c 20 71 32 3b 0d 7b | int q|1, q2;.{|
|000053d0| 0d 20 20 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |. regis|ter int |
|000053e0| 74 65 6d 20 3d 20 28 71 | 74 79 5f 70 68 79 73 5f |tem = (q|ty_phys_|
|000053f0| 73 75 67 67 5b 71 32 5d | 20 3e 3d 20 30 29 20 2d |sugg[q2]| >= 0) -|
|00005400| 20 28 71 74 79 5f 70 68 | 79 73 5f 73 75 67 67 5b | (qty_ph|ys_sugg[|
|00005410| 71 31 5d 20 3e 3d 20 30 | 29 3b 0d 20 20 69 66 20 |q1] >= 0|);. if |
|00005420| 28 74 65 6d 20 21 3d 20 | 30 29 20 72 65 74 75 72 |(tem != |0) retur|
|00005430| 6e 20 74 65 6d 3b 0d 20 | 20 72 65 74 75 72 6e 20 |n tem;. | return |
|00005440| 2d 28 28 71 74 79 5f 6e | 5f 72 65 66 73 5b 71 31 |-((qty_n|_refs[q1|
|00005450| 5d 20 2b 20 71 74 79 5f | 64 65 61 74 68 5b 71 31 |] + qty_|death[q1|
|00005460| 5d 20 2d 20 71 74 79 5f | 62 69 72 74 68 5b 71 31 |] - qty_|birth[q1|
|00005470| 5d 29 20 2a 20 71 74 79 | 5f 73 69 7a 65 5b 71 32 |]) * qty|_size[q2|
|00005480| 5d 0d 09 20 20 20 2d 20 | 28 71 74 79 5f 6e 5f 72 |].. - |(qty_n_r|
|00005490| 65 66 73 5b 71 32 5d 20 | 2b 20 71 74 79 5f 64 65 |efs[q2] |+ qty_de|
|000054a0| 61 74 68 5b 71 32 5d 20 | 2d 20 71 74 79 5f 62 69 |ath[q2] |- qty_bi|
|000054b0| 72 74 68 5b 71 32 5d 29 | 20 2a 20 71 74 79 5f 73 |rth[q2])| * qty_s|
|000054c0| 69 7a 65 5b 71 31 5d 29 | 3b 0d 7d 0d 0d 73 74 61 |ize[q1])|;.}..sta|
|000054d0| 74 69 63 20 69 6e 74 0d | 71 74 79 5f 63 6f 6d 70 |tic int.|qty_comp|
|000054e0| 61 72 65 5f 31 20 28 71 | 31 2c 20 71 32 29 0d 20 |are_1 (q|1, q2). |
|000054f0| 20 20 20 20 73 68 6f 72 | 74 20 2a 71 31 2c 20 2a | shor|t *q1, *|
|00005500| 71 32 3b 0d 7b 0d 20 20 | 72 65 67 69 73 74 65 72 |q2;.{. |register|
|00005510| 20 69 6e 74 20 74 65 6d | 20 3d 20 28 71 74 79 5f | int tem| = (qty_|
|00005520| 70 68 79 73 5f 73 75 67 | 67 5b 2a 71 32 5d 20 3e |phys_sug|g[*q2] >|
|00005530| 3d 20 30 29 20 2d 20 28 | 71 74 79 5f 70 68 79 73 |= 0) - (|qty_phys|
|00005540| 5f 73 75 67 67 5b 2a 71 | 31 5d 20 3e 3d 20 30 29 |_sugg[*q|1] >= 0)|
|00005550| 3b 0d 20 20 69 66 20 28 | 74 65 6d 20 21 3d 20 30 |;. if (|tem != 0|
|00005560| 29 20 72 65 74 75 72 6e | 20 74 65 6d 3b 0d 20 20 |) return| tem;. |
|00005570| 74 65 6d 20 3d 20 2d 28 | 28 71 74 79 5f 6e 5f 72 |tem = -(|(qty_n_r|
|00005580| 65 66 73 5b 2a 71 31 5d | 20 2b 20 71 74 79 5f 64 |efs[*q1]| + qty_d|
|00005590| 65 61 74 68 5b 2a 71 31 | 5d 20 2d 20 71 74 79 5f |eath[*q1|] - qty_|
|000055a0| 62 69 72 74 68 5b 2a 71 | 31 5d 29 20 2a 20 71 74 |birth[*q|1]) * qt|
|000055b0| 79 5f 73 69 7a 65 5b 2a | 71 32 5d 0d 09 20 20 2d |y_size[*|q2].. -|
|000055c0| 20 28 71 74 79 5f 6e 5f | 72 65 66 73 5b 2a 71 32 | (qty_n_|refs[*q2|
|000055d0| 5d 20 2b 20 71 74 79 5f | 64 65 61 74 68 5b 2a 71 |] + qty_|death[*q|
|000055e0| 32 5d 20 2d 20 71 74 79 | 5f 62 69 72 74 68 5b 2a |2] - qty|_birth[*|
|000055f0| 71 32 5d 29 20 2a 20 71 | 74 79 5f 73 69 7a 65 5b |q2]) * q|ty_size[|
|00005600| 2a 71 31 5d 29 3b 0d 20 | 20 69 66 20 28 74 65 6d |*q1]);. | if (tem|
|00005610| 20 21 3d 20 30 29 20 72 | 65 74 75 72 6e 20 74 65 | != 0) r|eturn te|
|00005620| 6d 3b 0d 20 20 2f 2a 20 | 49 66 20 71 74 79 73 20 |m;. /* |If qtys |
|00005630| 61 72 65 20 65 71 75 61 | 6c 6c 79 20 67 6f 6f 64 |are equa|lly good|
|00005640| 2c 20 73 6f 72 74 20 62 | 79 20 71 74 79 20 6e 75 |, sort b|y qty nu|
|00005650| 6d 62 65 72 2c 0d 20 20 | 20 20 20 73 6f 20 74 68 |mber,. | so th|
|00005660| 61 74 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 6f |at the r|esults o|
|00005670| 66 20 71 73 6f 72 74 20 | 6c 65 61 76 65 20 6e 6f |f qsort |leave no|
|00005680| 74 68 69 6e 67 20 74 6f | 20 63 68 61 6e 63 65 2e |thing to| chance.|
|00005690| 20 20 2a 2f 0d 20 20 72 | 65 74 75 72 6e 20 2a 71 | */. r|eturn *q|
|000056a0| 31 20 2d 20 2a 71 32 3b | 0d 7d 0d 0c 0d 2f 2a 20 |1 - *q2;|.}.../* |
|000056b0| 41 74 74 65 6d 70 74 20 | 74 6f 20 63 6f 6d 62 69 |Attempt |to combi|
|000056c0| 6e 65 20 74 68 65 20 74 | 77 6f 20 72 65 67 69 73 |ne the t|wo regis|
|000056d0| 74 65 72 73 20 28 72 74 | 78 27 73 29 20 55 53 45 |ters (rt|x's) USE|
|000056e0| 44 52 45 47 20 61 6e 64 | 20 53 45 54 52 45 47 2e |DREG and| SETREG.|
|000056f0| 0d 20 20 20 52 65 74 75 | 72 6e 73 20 31 20 69 66 |. Retu|rns 1 if|
|00005700| 20 68 61 76 65 20 64 6f | 6e 65 20 73 6f 2c 20 6f | have do|ne so, o|
|00005710| 72 20 30 20 69 66 20 63 | 61 6e 6e 6f 74 2e 0d 0d |r 0 if c|annot...|
|00005720| 20 20 20 43 6f 6d 62 69 | 6e 69 6e 67 20 72 65 67 | Combi|ning reg|
|00005730| 69 73 74 65 72 73 20 6d | 65 61 6e 73 20 6d 61 72 |isters m|eans mar|
|00005740| 6b 69 6e 67 20 74 68 65 | 6d 20 61 73 20 68 61 76 |king the|m as hav|
|00005750| 69 6e 67 20 74 68 65 20 | 73 61 6d 65 20 71 75 61 |ing the |same qua|
|00005760| 6e 74 69 74 79 0d 20 20 | 20 61 6e 64 20 61 64 6a |ntity. | and adj|
|00005770| 75 73 74 69 6e 67 20 74 | 68 65 20 6f 66 66 73 65 |usting t|he offse|
|00005780| 74 73 20 77 69 74 68 69 | 6e 20 74 68 65 20 71 75 |ts withi|n the qu|
|00005790| 61 6e 74 69 74 79 20 69 | 66 20 65 69 74 68 65 72 |antity i|f either|
|000057a0| 20 6f 66 0d 20 20 20 74 | 68 65 6d 20 69 73 20 61 | of. t|hem is a|
|000057b0| 20 53 55 42 52 45 47 29 | 2e 0d 0d 20 20 20 57 65 | SUBREG)|... We|
|000057c0| 20 64 6f 6e 27 74 20 61 | 63 74 75 61 6c 6c 79 20 | don't a|ctually |
|000057d0| 63 6f 6d 62 69 6e 65 20 | 61 20 68 61 72 64 20 72 |combine |a hard r|
|000057e0| 65 67 20 77 69 74 68 20 | 61 20 70 73 65 75 64 6f |eg with |a pseudo|
|000057f0| 3b 20 69 6e 73 74 65 61 | 64 0d 20 20 20 77 65 20 |; instea|d. we |
|00005800| 6a 75 73 74 20 72 65 63 | 6f 72 64 20 74 68 65 20 |just rec|ord the |
|00005810| 68 61 72 64 20 72 65 67 | 20 61 73 20 74 68 65 20 |hard reg| as the |
|00005820| 73 75 67 67 65 73 74 69 | 6f 6e 20 66 6f 72 20 74 |suggesti|on for t|
|00005830| 68 65 20 70 73 65 75 64 | 6f 27 73 20 71 75 61 6e |he pseud|o's quan|
|00005840| 74 69 74 79 2e 0d 20 20 | 20 49 66 20 77 65 20 72 |tity.. | If we r|
|00005850| 65 61 6c 6c 79 20 63 6f | 6d 62 69 6e 65 64 20 74 |eally co|mbined t|
|00005860| 68 65 6d 2c 20 77 65 20 | 63 6f 75 6c 64 20 6c 6f |hem, we |could lo|
|00005870| 73 65 20 69 66 20 74 68 | 65 20 70 73 65 75 64 6f |se if th|e pseudo|
|00005880| 20 6c 69 76 65 73 0d 20 | 20 20 61 63 72 6f 73 73 | lives. | across|
|00005890| 20 61 6e 20 69 6e 73 6e | 20 74 68 61 74 20 63 6c | an insn| that cl|
|000058a0| 6f 62 62 65 72 73 20 74 | 68 65 20 68 61 72 64 20 |obbers t|he hard |
|000058b0| 72 65 67 20 28 65 67 2c | 20 6d 6f 76 73 74 72 29 |reg (eg,| movstr)|
|000058c0| 2e 0d 0d 20 20 20 54 68 | 65 72 65 20 61 72 65 20 |... Th|ere are |
|000058d0| 65 6c 61 62 6f 72 61 74 | 65 20 63 68 65 63 6b 73 |elaborat|e checks|
|000058e0| 20 66 6f 72 20 74 68 65 | 20 76 61 6c 69 64 69 74 | for the| validit|
|000058f0| 79 20 6f 66 20 63 6f 6d | 62 69 6e 69 6e 67 2e 20 |y of com|bining. |
|00005900| 20 2a 2f 0d 0d 20 20 20 | 0d 73 74 61 74 69 63 20 | */.. |.static |
|00005910| 69 6e 74 0d 63 6f 6d 62 | 69 6e 65 5f 72 65 67 73 |int.comb|ine_regs|
|00005920| 20 28 75 73 65 64 72 65 | 67 2c 20 73 65 74 72 65 | (usedre|g, setre|
|00005930| 67 2c 20 62 2c 20 69 6e | 73 6e 5f 6e 75 6d 62 65 |g, b, in|sn_numbe|
|00005940| 72 2c 20 69 6e 73 6e 29 | 0d 20 20 20 20 20 72 74 |r, insn)|. rt|
|00005950| 78 20 75 73 65 64 72 65 | 67 2c 20 73 65 74 72 65 |x usedre|g, setre|
|00005960| 67 3b 0d 20 20 20 20 20 | 69 6e 74 20 62 3b 0d 20 |g;. |int b;. |
|00005970| 20 20 20 20 69 6e 74 20 | 69 6e 73 6e 5f 6e 75 6d | int |insn_num|
|00005980| 62 65 72 3b 0d 20 20 20 | 20 20 72 74 78 20 69 6e |ber;. | rtx in|
|00005990| 73 6e 3b 0d 7b 0d 20 20 | 72 65 67 69 73 74 65 72 |sn;.{. |register|
|000059a0| 20 69 6e 74 20 75 72 65 | 67 2c 20 73 72 65 67 3b | int ure|g, sreg;|
|000059b0| 0d 20 20 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |. regis|ter int |
|000059c0| 6f 66 66 73 65 74 20 3d | 20 30 3b 0d 20 20 69 6e |offset =| 0;. in|
|000059d0| 74 20 75 73 69 7a 65 2c | 20 73 73 69 7a 65 3b 0d |t usize,| ssize;.|
|000059e0| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 73 | regist|er int s|
|000059f0| 71 74 79 3b 0d 0d 20 20 | 2f 2a 20 44 65 74 65 72 |qty;.. |/* Deter|
|00005a00| 6d 69 6e 65 20 74 68 65 | 20 6e 75 6d 62 65 72 73 |mine the| numbers|
|00005a10| 20 61 6e 64 20 73 69 7a | 65 73 20 6f 66 20 72 65 | and siz|es of re|
|00005a20| 67 69 73 74 65 72 73 20 | 62 65 69 6e 67 20 75 73 |gisters |being us|
|00005a30| 65 64 2e 20 20 2a 2f 0d | 0d 0d 23 69 66 64 65 66 |ed. */.|..#ifdef|
|00005a40| 20 4d 50 57 0d 20 20 53 | 70 69 6e 43 75 72 73 6f | MPW. S|pinCurso|
|00005a50| 72 28 31 29 3b 0d 23 65 | 6e 64 69 66 0d 0d 20 20 |r(1);.#e|ndif.. |
|00005a60| 77 68 69 6c 65 20 28 47 | 45 54 5f 43 4f 44 45 20 |while (G|ET_CODE |
|00005a70| 28 75 73 65 64 72 65 67 | 29 20 3d 3d 20 53 55 42 |(usedreg|) == SUB|
|00005a80| 52 45 47 29 0d 20 20 20 | 20 7b 0d 20 20 20 20 20 |REG). | {. |
|00005a90| 20 6f 66 66 73 65 74 20 | 2b 3d 20 53 55 42 52 45 | offset |+= SUBRE|
|00005aa0| 47 5f 57 4f 52 44 20 28 | 75 73 65 64 72 65 67 29 |G_WORD (|usedreg)|
|00005ab0| 3b 0d 20 20 20 20 20 20 | 75 73 65 64 72 65 67 20 |;. |usedreg |
|00005ac0| 3d 20 53 55 42 52 45 47 | 5f 52 45 47 20 28 75 73 |= SUBREG|_REG (us|
|00005ad0| 65 64 72 65 67 29 3b 0d | 20 20 20 20 7d 0d 20 20 |edreg);.| }. |
|00005ae0| 69 66 20 28 47 45 54 5f | 43 4f 44 45 20 28 75 73 |if (GET_|CODE (us|
|00005af0| 65 64 72 65 67 29 20 21 | 3d 20 52 45 47 29 0d 20 |edreg) !|= REG). |
|00005b00| 20 20 20 72 65 74 75 72 | 6e 20 30 3b 0d 20 20 75 | retur|n 0;. u|
|00005b10| 72 65 67 20 3d 20 52 45 | 47 4e 4f 20 28 75 73 65 |reg = RE|GNO (use|
|00005b20| 64 72 65 67 29 3b 0d 20 | 20 75 73 69 7a 65 20 3d |dreg);. | usize =|
|00005b30| 20 52 45 47 5f 53 49 5a | 45 20 28 75 73 65 64 72 | REG_SIZ|E (usedr|
|00005b40| 65 67 29 3b 0d 0d 20 20 | 77 68 69 6c 65 20 28 47 |eg);.. |while (G|
|00005b50| 45 54 5f 43 4f 44 45 20 | 28 73 65 74 72 65 67 29 |ET_CODE |(setreg)|
|00005b60| 20 3d 3d 20 53 55 42 52 | 45 47 29 0d 20 20 20 20 | == SUBR|EG). |
|00005b70| 7b 0d 20 20 20 20 20 20 | 6f 66 66 73 65 74 20 2d |{. |offset -|
|00005b80| 3d 20 53 55 42 52 45 47 | 5f 57 4f 52 44 20 28 73 |= SUBREG|_WORD (s|
|00005b90| 65 74 72 65 67 29 3b 0d | 20 20 20 20 20 20 73 65 |etreg);.| se|
|00005ba0| 74 72 65 67 20 3d 20 53 | 55 42 52 45 47 5f 52 45 |treg = S|UBREG_RE|
|00005bb0| 47 20 28 73 65 74 72 65 | 67 29 3b 0d 20 20 20 20 |G (setre|g);. |
|00005bc0| 7d 0d 20 20 69 66 20 28 | 47 45 54 5f 43 4f 44 45 |}. if (|GET_CODE|
|00005bd0| 20 28 73 65 74 72 65 67 | 29 20 21 3d 20 52 45 47 | (setreg|) != REG|
|00005be0| 29 0d 20 20 20 20 72 65 | 74 75 72 6e 20 30 3b 0d |). re|turn 0;.|
|00005bf0| 20 20 73 72 65 67 20 3d | 20 52 45 47 4e 4f 20 28 | sreg =| REGNO (|
|00005c00| 73 65 74 72 65 67 29 3b | 0d 20 20 73 73 69 7a 65 |setreg);|. ssize|
|00005c10| 20 3d 20 52 45 47 5f 53 | 49 5a 45 20 28 73 65 74 | = REG_S|IZE (set|
|00005c20| 72 65 67 29 3b 0d 0d 20 | 20 2f 2a 20 44 6f 20 6e |reg);.. | /* Do n|
|00005c30| 6f 74 20 63 6f 6d 62 69 | 6e 65 20 72 65 67 69 73 |ot combi|ne regis|
|00005c40| 74 65 72 73 20 75 6e 6c | 65 73 73 20 6f 6e 65 20 |ters unl|ess one |
|00005c50| 66 69 74 73 20 77 69 74 | 68 69 6e 20 74 68 65 20 |fits wit|hin the |
|00005c60| 6f 74 68 65 72 2e 20 20 | 2a 2f 0d 20 20 69 66 20 |other. |*/. if |
|00005c70| 28 6f 66 66 73 65 74 20 | 3e 20 30 20 26 26 20 75 |(offset |> 0 && u|
|00005c80| 73 69 7a 65 20 2b 20 6f | 66 66 73 65 74 20 3e 20 |size + o|ffset > |
|00005c90| 73 73 69 7a 65 29 0d 20 | 20 20 20 72 65 74 75 72 |ssize). | retur|
|00005ca0| 6e 20 30 3b 0d 20 20 69 | 66 20 28 6f 66 66 73 65 |n 0;. i|f (offse|
|00005cb0| 74 20 3c 20 30 20 26 26 | 20 75 73 69 7a 65 20 2b |t < 0 &&| usize +|
|00005cc0| 20 6f 66 66 73 65 74 20 | 3c 20 73 73 69 7a 65 29 | offset |< ssize)|
|00005cd0| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 30 3b 0d 20 |. ret|urn 0;. |
|00005ce0| 20 2f 2a 20 44 6f 20 6e | 6f 74 20 63 6f 6d 62 69 | /* Do n|ot combi|
|00005cf0| 6e 65 20 77 69 74 68 20 | 61 20 73 6d 61 6c 6c 65 |ne with |a smalle|
|00005d00| 72 20 61 6c 72 65 61 64 | 79 2d 61 73 73 69 67 6e |r alread|y-assign|
|00005d10| 65 64 20 6f 62 6a 65 63 | 74 0d 20 20 20 20 20 69 |ed objec|t. i|
|00005d20| 66 20 74 68 61 74 20 73 | 6d 61 6c 6c 65 72 20 6f |f that s|maller o|
|00005d30| 62 6a 65 63 74 20 69 73 | 20 61 6c 72 65 61 64 79 |bject is| already|
|00005d40| 20 63 6f 6d 62 69 6e 65 | 64 20 77 69 74 68 20 73 | combine|d with s|
|00005d50| 6f 6d 65 74 68 69 6e 67 | 20 62 69 67 67 65 72 0d |omething| bigger.|
|00005d60| 20 20 20 20 20 6f 72 20 | 69 66 20 74 68 61 74 20 | or |if that |
|00005d70| 73 6d 61 6c 6c 65 72 20 | 6f 62 6a 65 63 74 20 69 |smaller |object i|
|00005d80| 73 20 61 20 68 61 72 64 | 20 72 65 67 2e 0d 20 20 |s a hard| reg.. |
|00005d90| 20 20 20 49 6e 20 74 68 | 65 20 6c 61 74 74 65 72 | In th|e latter|
|00005da0| 20 63 61 73 65 2c 20 77 | 65 20 77 6f 75 6c 64 20 | case, w|e would |
|00005db0| 69 6d 70 6c 69 63 69 74 | 6c 79 20 62 65 20 75 73 |implicit|ly be us|
|00005dc0| 69 6e 67 20 63 6f 6e 73 | 65 63 75 74 69 76 65 0d |ing cons|ecutive.|
|00005dd0| 20 20 20 20 20 68 61 72 | 64 20 72 65 67 73 2c 20 | har|d regs, |
|00005de0| 61 6e 64 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |and ther|e is no |
|00005df0| 63 6f 64 65 20 74 6f 20 | 6b 65 65 70 20 74 72 61 |code to |keep tra|
|00005e00| 63 6b 20 6f 66 20 74 68 | 61 74 2e 0d 20 20 20 20 |ck of th|at.. |
|00005e10| 20 28 54 68 69 73 20 69 | 73 20 6f 76 65 72 63 61 | (This i|s overca|
|00005e20| 75 74 69 6f 75 73 3b 20 | 77 65 20 63 6f 75 6c 64 |utious; |we could|
|00005e30| 20 63 68 65 63 6b 20 74 | 68 61 74 20 73 73 69 7a | check t|hat ssiz|
|00005e40| 65 20 61 63 74 75 61 6c | 6c 79 0d 20 20 20 20 20 |e actual|ly. |
|00005e50| 72 65 71 75 69 72 65 73 | 20 6d 6f 72 65 20 68 61 |requires| more ha|
|00005e60| 72 64 20 72 65 67 73 20 | 61 74 20 74 68 69 73 20 |rd regs |at this |
|00005e70| 73 70 6f 74 2e 29 20 20 | 2a 2f 0d 20 20 69 66 20 |spot.) |*/. if |
|00005e80| 28 73 73 69 7a 65 20 3e | 20 75 73 69 7a 65 20 26 |(ssize >| usize &|
|00005e90| 26 20 72 65 67 5f 71 74 | 79 5b 75 72 65 67 5d 20 |& reg_qt|y[ureg] |
|00005ea0| 3e 3d 20 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f |>= FIRST|_PSEUDO_|
|00005eb0| 52 45 47 49 53 54 45 52 | 0d 20 20 20 20 20 20 26 |REGISTER|. &|
|00005ec0| 26 20 75 73 69 7a 65 20 | 3c 20 71 74 79 5f 73 69 |& usize |< qty_si|
|00005ed0| 7a 65 5b 72 65 67 5f 71 | 74 79 5b 75 72 65 67 5d |ze[reg_q|ty[ureg]|
|00005ee0| 5d 29 0d 20 20 20 20 72 | 65 74 75 72 6e 20 30 3b |]). r|eturn 0;|
|00005ef0| 0d 0d 20 20 2f 2a 20 44 | 6f 6e 27 74 20 64 6f 20 |.. /* D|on't do |
|00005f00| 61 6e 79 74 68 69 6e 67 | 20 77 69 74 68 20 74 68 |anything| with th|
|00005f10| 65 20 6e 6f 6e 2d 61 6c | 6c 6f 63 61 74 61 62 6c |e non-al|locatabl|
|00005f20| 65 20 72 65 67 69 73 74 | 65 72 73 2e 0d 20 20 20 |e regist|ers.. |
|00005f30| 20 20 41 6c 73 6f 2c 20 | 64 6f 6e 27 74 20 73 75 | Also, |don't su|
|00005f40| 67 67 65 73 74 20 61 20 | 63 61 6c 6c 2d 63 6c 6f |ggest a |call-clo|
|00005f50| 62 62 65 72 61 62 6c 65 | 20 72 65 67 69 73 74 65 |bberable| registe|
|00005f60| 72 0d 20 20 20 20 20 66 | 6f 72 20 73 6f 6d 65 74 |r. f|or somet|
|00005f70| 68 69 6e 67 20 74 68 61 | 74 20 6d 75 73 74 20 6c |hing tha|t must l|
|00005f80| 69 76 65 20 61 63 72 6f | 73 73 20 63 61 6c 6c 73 |ive acro|ss calls|
|00005f90| 2e 0d 20 20 20 20 20 41 | 6c 73 6f 2c 20 64 6f 6e |.. A|lso, don|
|00005fa0| 27 74 20 73 75 67 67 65 | 73 74 20 61 20 68 61 72 |'t sugge|st a har|
|00005fb0| 64 77 61 72 65 20 72 65 | 67 69 73 74 65 72 20 66 |dware re|gister f|
|00005fc0| 6f 72 20 61 6e 79 74 68 | 69 6e 67 20 6c 61 72 67 |or anyth|ing larg|
|00005fd0| 65 72 20 74 68 61 6e 20 | 69 74 2e 20 20 2a 2f 0d |er than |it. */.|
|00005fe0| 20 20 69 66 20 28 75 72 | 65 67 20 3c 20 46 49 52 | if (ur|eg < FIR|
|00005ff0| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|00006000| 45 52 29 0d 20 20 20 20 | 7b 0d 20 20 20 20 20 20 |ER). |{. |
|00006010| 69 66 20 28 66 69 78 65 | 64 5f 72 65 67 73 5b 75 |if (fixe|d_regs[u|
|00006020| 72 65 67 5d 29 0d 09 72 | 65 74 75 72 6e 20 30 3b |reg])..r|eturn 0;|
|00006030| 0d 20 20 20 20 20 20 69 | 66 20 28 72 65 67 5f 6e |. i|f (reg_n|
|00006040| 5f 63 61 6c 6c 73 5f 63 | 72 6f 73 73 65 64 5b 73 |_calls_c|rossed[s|
|00006050| 72 65 67 5d 20 21 3d 20 | 30 20 26 26 20 63 61 6c |reg] != |0 && cal|
|00006060| 6c 5f 75 73 65 64 5f 72 | 65 67 73 5b 75 72 65 67 |l_used_r|egs[ureg|
|00006070| 5d 29 0d 09 72 65 74 75 | 72 6e 20 30 3b 0d 20 20 |])..retu|rn 0;. |
|00006080| 20 20 20 20 69 66 20 28 | 75 73 69 7a 65 20 3c 20 | if (|usize < |
|00006090| 73 73 69 7a 65 29 0d 09 | 72 65 74 75 72 6e 20 30 |ssize)..|return 0|
|000060a0| 3b 0d 20 20 20 20 7d 0d | 0d 20 20 69 66 20 28 73 |;. }.|. if (s|
|000060b0| 72 65 67 20 3c 20 46 49 | 52 53 54 5f 50 53 45 55 |reg < FI|RST_PSEU|
|000060c0| 44 4f 5f 52 45 47 49 53 | 54 45 52 29 0d 20 20 20 |DO_REGIS|TER). |
|000060d0| 20 7b 0d 20 20 20 20 20 | 20 69 66 20 28 66 69 78 | {. | if (fix|
|000060e0| 65 64 5f 72 65 67 73 5b | 73 72 65 67 5d 29 0d 09 |ed_regs[|sreg])..|
|000060f0| 72 65 74 75 72 6e 20 30 | 3b 0d 20 20 20 20 20 20 |return 0|;. |
|00006100| 69 66 20 28 72 65 67 5f | 6e 5f 63 61 6c 6c 73 5f |if (reg_|n_calls_|
|00006110| 63 72 6f 73 73 65 64 5b | 75 72 65 67 5d 20 21 3d |crossed[|ureg] !=|
|00006120| 20 30 20 26 26 20 63 61 | 6c 6c 5f 75 73 65 64 5f | 0 && ca|ll_used_|
|00006130| 72 65 67 73 5b 73 72 65 | 67 5d 29 0d 09 72 65 74 |regs[sre|g])..ret|
|00006140| 75 72 6e 20 30 3b 0d 20 | 20 20 20 20 20 69 66 20 |urn 0;. | if |
|00006150| 28 73 73 69 7a 65 20 3c | 20 75 73 69 7a 65 29 0d |(ssize <| usize).|
|00006160| 09 72 65 74 75 72 6e 20 | 30 3b 0d 20 20 20 20 7d |.return |0;. }|
|00006170| 0d 0d 20 20 2f 2a 20 44 | 6f 6e 27 74 20 74 69 65 |.. /* D|on't tie|
|00006180| 20 73 6f 6d 65 74 68 69 | 6e 67 20 74 6f 20 69 74 | somethi|ng to it|
|00006190| 73 65 6c 66 2e 20 20 49 | 6e 20 6d 6f 73 74 20 63 |self. I|n most c|
|000061a0| 61 73 65 73 20 69 74 20 | 77 6f 75 6c 64 20 6d 61 |ases it |would ma|
|000061b0| 6b 65 20 6e 6f 0d 20 20 | 20 20 20 64 69 66 66 65 |ke no. | diffe|
|000061c0| 72 65 6e 63 65 2c 20 62 | 75 74 20 69 74 20 77 6f |rence, b|ut it wo|
|000061d0| 75 6c 64 20 73 63 72 65 | 77 20 75 70 20 69 66 20 |uld scre|w up if |
|000061e0| 74 68 65 20 72 65 67 20 | 62 65 69 6e 67 20 74 69 |the reg |being ti|
|000061f0| 65 64 20 74 6f 20 69 74 | 73 65 6c 66 0d 20 20 20 |ed to it|self. |
|00006200| 20 20 61 6c 73 6f 20 64 | 69 65 73 20 69 6e 20 74 | also d|ies in t|
|00006210| 68 69 73 20 69 6e 73 6e | 2e 20 20 2a 2f 0d 0d 20 |his insn|. */.. |
|00006220| 20 69 66 20 28 75 72 65 | 67 20 3d 3d 20 73 72 65 | if (ure|g == sre|
|00006230| 67 29 0d 20 20 20 20 72 | 65 74 75 72 6e 20 30 3b |g). r|eturn 0;|
|00006240| 20 0d 0d 20 20 2f 2a 20 | 44 6f 6e 27 74 20 74 72 | .. /* |Don't tr|
|00006250| 79 20 74 6f 20 63 6f 6e | 6e 65 63 74 20 74 77 6f |y to con|nect two|
|00006260| 20 64 69 66 66 65 72 65 | 6e 74 20 68 61 72 64 77 | differe|nt hardw|
|00006270| 61 72 65 20 72 65 67 69 | 73 74 65 72 73 2e 20 20 |are regi|sters. |
|00006280| 2a 2f 0d 0d 20 20 69 66 | 20 28 75 72 65 67 20 3c |*/.. if| (ureg <|
|00006290| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|000062a0| 47 49 53 54 45 52 20 26 | 26 20 73 72 65 67 20 3c |GISTER &|& sreg <|
|000062b0| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|000062c0| 47 49 53 54 45 52 29 0d | 20 20 20 20 72 65 74 75 |GISTER).| retu|
|000062d0| 72 6e 20 30 3b 0d 0d 20 | 20 2f 2a 20 44 6f 6e 27 |rn 0;.. | /* Don'|
|000062e0| 74 20 63 6f 6e 6e 65 63 | 74 20 74 77 6f 20 64 69 |t connec|t two di|
|000062f0| 66 66 65 72 65 6e 74 20 | 6d 61 63 68 69 6e 65 20 |fferent |machine |
|00006300| 6d 6f 64 65 73 20 69 66 | 20 74 68 65 79 20 68 61 |modes if| they ha|
|00006310| 76 65 20 64 69 66 66 65 | 72 65 6e 74 0d 20 20 20 |ve diffe|rent. |
|00006320| 20 20 69 6d 70 6c 69 63 | 61 74 69 6f 6e 73 20 61 | implic|ations a|
|00006330| 73 20 74 6f 20 77 68 69 | 63 68 20 72 65 67 69 73 |s to whi|ch regis|
|00006340| 74 65 72 73 20 6d 61 79 | 20 62 65 20 75 73 65 64 |ters may| be used|
|00006350| 2e 20 20 2a 2f 0d 0d 20 | 20 69 66 20 28 21 4d 4f |. */.. | if (!MO|
|00006360| 44 45 53 5f 54 49 45 41 | 42 4c 45 5f 50 20 28 47 |DES_TIEA|BLE_P (G|
|00006370| 45 54 5f 4d 4f 44 45 20 | 28 75 73 65 64 72 65 67 |ET_MODE |(usedreg|
|00006380| 29 2c 20 47 45 54 5f 4d | 4f 44 45 20 28 73 65 74 |), GET_M|ODE (set|
|00006390| 72 65 67 29 29 29 0d 20 | 20 20 20 72 65 74 75 72 |reg))). | retur|
|000063a0| 6e 20 30 3b 0d 0d 20 20 | 2f 2a 20 4e 6f 77 2c 20 |n 0;.. |/* Now, |
|000063b0| 69 66 20 6f 6e 65 20 6f | 66 20 55 52 45 47 20 61 |if one o|f UREG a|
|000063c0| 6e 64 20 53 52 45 47 20 | 69 73 20 61 20 68 61 72 |nd SREG |is a har|
|000063d0| 64 20 72 65 67 20 61 6e | 64 20 74 68 65 20 6f 74 |d reg an|d the ot|
|000063e0| 68 65 72 20 69 73 0d 20 | 20 20 20 20 61 20 70 73 |her is. | a ps|
|000063f0| 65 75 64 6f 2c 20 72 65 | 63 6f 72 64 20 74 68 65 |eudo, re|cord the|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.